Base class for value selection and commit. More...
#include <brancher-val-sel-commit.hpp>
Public Types | |
typedef _View | View |
View type. | |
typedef _Val | Val |
Value type. | |
Public Member Functions | |
ValSelCommitBase (Space &home, const ValBranch &vb) | |
Constructor for initialization. | |
ValSelCommitBase (Space &home, bool shared, ValSelCommitBase< View, Val > &vsc) | |
Constructor for cloning. | |
virtual Val | val (const Space &home, View x, int i)=0 |
Return value of view x at position i. | |
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. | |
virtual NGL * | ngl (Space &home, unsigned int a, View x, Val n) const =0 |
Create no-good literal for choice c and alternative a. | |
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. | |
virtual ValSelCommitBase< View, Val > * | copy (Space &home, bool shared)=0 |
Perform cloning. | |
virtual bool | notice (void) const =0 |
Whether dispose must always be called (that is, notice is needed) | |
virtual void | dispose (Space &home)=0 |
Delete value selection. | |
Memory management | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. | |
static void | operator delete (void *p, Space &home) |
Return memory to space. | |
static void | operator delete (void *p) |
Needed for exceptions. |
Base class for value selection and commit.
Definition at line 48 of file brancher-val-sel-commit.hpp.
typedef _View Gecode::ValSelCommitBase< _View, _Val >::View |
View type.
Reimplemented in Gecode::ValSelCommit< ValSel, ValCommit >.
Definition at line 51 of file brancher-val-sel-commit.hpp.
typedef _Val Gecode::ValSelCommitBase< _View, _Val >::Val |
Value type.
Reimplemented in Gecode::ValSelCommit< ValSel, ValCommit >.
Definition at line 53 of file brancher-val-sel-commit.hpp.
Gecode::ValSelCommitBase< View, Val >::ValSelCommitBase | ( | Space & | home, |
const ValBranch & | vb | ||
) | [inline] |
Constructor for initialization.
Definition at line 131 of file brancher-val-sel-commit.hpp.
Gecode::ValSelCommitBase< View, Val >::ValSelCommitBase | ( | Space & | home, |
bool | shared, | ||
ValSelCommitBase< View, Val > & | vsc | ||
) | [inline] |
Constructor for cloning.
Definition at line 135 of file brancher-val-sel-commit.hpp.
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 >.
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 >.
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 >.
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 >.
virtual ValSelCommitBase<View,Val>* Gecode::ValSelCommitBase< _View, _Val >::copy | ( | Space & | home, |
bool | shared | ||
) | [pure virtual] |
Perform cloning.
Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.
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 >.
virtual void Gecode::ValSelCommitBase< _View, _Val >::dispose | ( | Space & | home | ) | [pure virtual] |
Delete value selection.
Implemented in Gecode::ValSelCommit< ValSel, ValCommit >.
void * Gecode::ValSelCommitBase< View, Val >::operator new | ( | size_t | s, |
Space & | home | ||
) | [inline, static] |
Allocate memory from space.
Definition at line 145 of file brancher-val-sel-commit.hpp.
void Gecode::ValSelCommitBase< View, Val >::operator delete | ( | void * | p, |
Space & | home | ||
) | [inline, static] |
Return memory to space.
Definition at line 142 of file brancher-val-sel-commit.hpp.
void Gecode::ValSelCommitBase< View, Val >::operator delete | ( | void * | p | ) | [inline, static] |
Needed for exceptions.
Definition at line 139 of file brancher-val-sel-commit.hpp.