43 template<
class _View,
class _Val>
49 typedef typename View::VarType
Var;
67 typename BranchTraits<typename View::VarType>::ValType> {
96 template<
class View,
class Val>
99 template<
class View,
class Val>
102 template<
class View,
class Val>
107 template<
class View,
class Val>
117 :
ValSel<View,Val>(home,vb), v(vb.val()) {
129 typename View::VarType
y(
x.
varimp());
131 return v()(home,
y,i);
Exception: invalid function
Class for sharing data between spaces.
Value branching information.
User-defined value selection.
BranchTraits< Var >::Val ValFunction
The corresponding value function.
ValSelFunction(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
void dispose(Space &home)
Delete value selection.
ValSel< View, typenameBranchTraits< typenameView::VarType >::ValType >::Val Val
The corresponding value type.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
SharedData< ValFunction > v
The user-defined value function.
Val val(const Space &home, View x, int i)
Return user-defined value of view x at position i.
Base class for value selection.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
ValSel(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
void dispose(Space &home)
Delete value selection.
View::VarType Var
Corresponding variable type.
ValSel(Space &home, ValSel< View, Val > &vs)
Constructor for cloning.
VarImp * varimp(void) const
Return variable implementation of variable.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.