Generated on Thu Jul 21 2022 00:00:00 for Gecode by doxygen 1.9.4
Gecode::ValSelCommitBase< _View, _Val > Class Template Referenceabstract

Base class for value selection and commit. More...

#include <val-sel-commit.hpp>

Public Types

typedef _View View
 View type. More...
 
typedef View::VarType Var
 Corresponding variable type. More...
 
typedef _Val Val
 Value type. More...
 

Public Member Functions

 ValSelCommitBase (Space &home, const ValBranch< Var > &vb)
 Constructor for initialization. More...
 
 ValSelCommitBase (Space &home, ValSelCommitBase< View, Val > &vsc)
 Constructor for cloning. More...
 
virtual Val val (const Space &home, View x, int i)=0
 Return value of view x at position i. More...
 
virtual ModEvent commit (Space &home, unsigned int a, View x, int i, Val n)=0
 Commit view x at position i to value n for alternative a. More...
 
virtual NGLngl (Space &home, unsigned int a, View x, Val n) const =0
 Create no-good literal for choice c and alternative a. More...
 
virtual void print (const Space &home, unsigned int a, View x, int i, const Val &n, std::ostream &o) const =0
 Print on o branch for alternative a, view x at position i, and value n. More...
 
virtual ValSelCommitBase< View, Val > * copy (Space &home)=0
 Perform cloning. More...
 
virtual bool notice (void) const =0
 Whether dispose must always be called (that is, notice is needed) More...
 
virtual void dispose (Space &home)=0
 Delete value selection. More...
 
virtual ~ValSelCommitBase (void)
 Unused destructor. More...
 

Memory management

static void * operator new (size_t s, Space &home)
 Allocate memory from space. More...
 
static void operator delete (void *p, Space &home)
 Return memory to space. More...
 
static void operator delete (void *p)
 Needed for exceptions. More...
 

Detailed Description

template<class _View, class _Val>
class Gecode::ValSelCommitBase< _View, _Val >

Base class for value selection and commit.

Definition at line 44 of file val-sel-commit.hpp.

Member Typedef Documentation

◆ View

template<class _View , class _Val >
typedef _View Gecode::ValSelCommitBase< _View, _Val >::View

View type.

Definition at line 47 of file val-sel-commit.hpp.

◆ Var

template<class _View , class _Val >
typedef View::VarType Gecode::ValSelCommitBase< _View, _Val >::Var

Corresponding variable type.

Definition at line 49 of file val-sel-commit.hpp.

◆ Val

template<class _View , class _Val >
typedef _Val Gecode::ValSelCommitBase< _View, _Val >::Val

Value type.

Definition at line 51 of file val-sel-commit.hpp.

Constructor & Destructor Documentation

◆ ValSelCommitBase() [1/2]

template<class View , class Val >
Gecode::ValSelCommitBase< View, Val >::ValSelCommitBase ( Space home,
const ValBranch< Var > &  vb 
)
inline

Constructor for initialization.

Definition at line 131 of file val-sel-commit.hpp.

◆ ValSelCommitBase() [2/2]

template<class View , class Val >
Gecode::ValSelCommitBase< View, Val >::ValSelCommitBase ( Space home,
ValSelCommitBase< View, Val > &  vsc 
)
inline

Constructor for cloning.

Definition at line 135 of file val-sel-commit.hpp.

◆ ~ValSelCommitBase()

template<class View , class Val >
Gecode::ValSelCommitBase< View, Val >::~ValSelCommitBase ( void  )
virtual

Unused destructor.

Definition at line 138 of file val-sel-commit.hpp.

Member Function Documentation

◆ val()

template<class _View , class _Val >
virtual Val Gecode::ValSelCommitBase< _View, _Val >::val ( const Space home,
View  x,
int  i 
)
pure virtual

Return value of view x at position i.

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ commit()

template<class _View , class _Val >
virtual ModEvent Gecode::ValSelCommitBase< _View, _Val >::commit ( Space home,
unsigned int  a,
View  x,
int  i,
Val  n 
)
pure virtual

Commit view x at position i to value n for alternative a.

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ ngl()

template<class _View , class _Val >
virtual NGL * Gecode::ValSelCommitBase< _View, _Val >::ngl ( Space home,
unsigned int  a,
View  x,
Val  n 
) const
pure virtual

Create no-good literal for choice c and alternative a.

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ print()

template<class _View , class _Val >
virtual void Gecode::ValSelCommitBase< _View, _Val >::print ( const Space home,
unsigned int  a,
View  x,
int  i,
const Val n,
std::ostream &  o 
) const
pure virtual

Print on o branch for alternative a, view x at position i, and value n.

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ copy()

template<class _View , class _Val >
virtual ValSelCommitBase< View, Val > * Gecode::ValSelCommitBase< _View, _Val >::copy ( Space home)
pure virtual

Perform cloning.

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ notice()

template<class _View , class _Val >
virtual bool Gecode::ValSelCommitBase< _View, _Val >::notice ( void  ) const
pure virtual

Whether dispose must always be called (that is, notice is needed)

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ dispose()

template<class _View , class _Val >
virtual void Gecode::ValSelCommitBase< _View, _Val >::dispose ( Space home)
pure virtual

Delete value selection.

Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.

◆ operator new()

template<class View , class Val >
void * Gecode::ValSelCommitBase< View, Val >::operator new ( size_t  s,
Space home 
)
inlinestatic

Allocate memory from space.

Definition at line 148 of file val-sel-commit.hpp.

◆ operator delete() [1/2]

template<class View , class Val >
void Gecode::ValSelCommitBase< View, Val >::operator delete ( void *  p,
Space home 
)
inlinestatic

Return memory to space.

Definition at line 145 of file val-sel-commit.hpp.

◆ operator delete() [2/2]

template<class View , class Val >
void Gecode::ValSelCommitBase< View, Val >::operator delete ( void *  p)
inlinestatic

Needed for exceptions.

Definition at line 142 of file val-sel-commit.hpp.


The documentation for this class was generated from the following file: