49 template<
class _View,
class _Val>
178 template<
class View,
class Val>
181 template<
class View,
class Val>
184 template<
class View,
class Val>
189 template<
class View,
class Val>
197 :
MeritBase<View,double>(home,vb),
f(vb.merit()) {
211 typename View::VarType
y(
x.
varimp());
213 return f()(home,
y,
i);
231 :
MeritBase<View,unsigned int>(home,vb) {}
276 :
MeritBase<View,double>(home,vb), action(vb.action()) {}
304 :
MeritBase<View,double>(home,vb), chb(vb.chb()) {}
void dispose(Space &home)
Dispose view selection.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
MeritDegree(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
double afc(void) const
Return accumulated failure count.
BranchTraits< Var >::Merit Function
Corresponding merit function type.
void update(Space &home, bool share, SharedHandle &sh)
Update during cloning.
double operator()(const Space &home, View x, int i)
Return degree as merit for view x at position i.
VarImp * varimp(void) const
Return variable implementation of variable.
void update(int i)
Update chb value at position i.
View::VarType Var
Corresponding variable type.
MeritAction(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Base-class for merit class.
unsigned int operator()(const Space &home, View x, int i)
Return degree as merit for view x at position i.
MeritCHB(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Action action
Action information.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Class for AFC (accumulated failure count) management.
MeritFunction(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
double operator()(const Space &home, View x, int i)
Return action as merit for view x at position i.
void update(int i)
Update action value at position i.
SharedData< Function > f
The user-defined merit function.
Merit class for user-defined merit function.
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors)
Class for CHB management.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Exception: invalid function
double operator()(const Space &home, View x, int i)
Return action as merit for view x at position i.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
Post propagator for SetVar SetOpType SetVar y
Variable branching information.
void dispose(Space &home)
Dispose view selection.
void dispose(Space &home)
Dispose view selection.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
MeritBase(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Post propagator for SetVar x
MeritAFC(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
void dispose(Space &home)
Delete view merit class.
Gecode toplevel namespace
Class for action management.
void update(Space &home, bool share, AFC &a)
Updating during cloning.
void dispose(Space &home)
Delete view merit class.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
double operator()(const Space &home, View x, int i)
Return AFC as merit for view x at position i.