34namespace Gecode {
namespace Int {
namespace Branch {
41 : MeritBase<View,int>(home,vb) {}
73 :
MeritBase<View,unsigned int>(home,vb) {}
97 return static_cast<double>(
x.
degree()) /
static_cast<double>(
x.size());
105 :
MeritBase<View,double>(home,vb), afc(vb.afc()) {}
109 :
MeritBase<View,double>(home,m), afc(m.afc) {}
113 return x.
afc() /
static_cast<double>(
x.size());
132 :
MeritBase<View,double>(home,vb), action(vb.action()) {}
136 :
MeritBase<View,double>(home,m), action(m.action) {}
140 return action[i] /
static_cast<double>(
x.size());
158 :
MeritBase<View,double>(home,vb), chb(vb.chb()) {}
162 :
MeritBase<View,double>(home,m), chb(m.chb) {}
166 return chb[i] /
static_cast<double>(
x.size());
184 :
MeritBase<View,unsigned int>(home,vb) {}
188 :
MeritBase<View,unsigned int>(home,m) {}
192 return x.regret_min();
200 :
MeritBase<View,unsigned int>(home,vb) {}
204 :
MeritBase<View,unsigned int>(home,m) {}
208 return x.regret_max();
Merit class for AFC over size.
void dispose(Space &home)
Dispose view selection.
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 over size as merit for view x at position i.
MeritAFCSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Merit class for action over size.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
MeritActionSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
double operator()(const Space &home, View x, int i)
Return action over size as merit for view x at position i.
void dispose(Space &home)
Dispose view selection.
Merit class for CHB over size.
void dispose(Space &home)
Dispose view selection.
double operator()(const Space &home, View x, int i)
Return size over action as merit for view x at position i.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
MeritCHBSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Merit class for degree over size.
double operator()(const Space &home, View x, int i)
Return degree over size as merit for view x at position i.
MeritDegreeSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
MeritMax(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
int operator()(const Space &home, View x, int i)
Return maximum as merit for view x at position i.
Merit class for mimimum of integer views.
MeritMin(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
int operator()(const Space &home, View x, int i)
Return minimum as merit for view x at position i.
Merit class for maximum regret.
MeritRegretMax(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return maximum regret as merit for view x at position i.
Merit class for minimum regret.
MeritRegretMin(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return minimum regret as merit for view x at position i.
MeritSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return size as merit for view x at position i.
Base-class for merit class.
Variable branching information.
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors)
double afc(void) const
Return accumulated failure count.
Gecode toplevel namespace
Post propagator for SetVar x