38 namespace Gecode {
namespace Int {
namespace Branch {
43 :
ValSel<View,int>(home,vb) {}
57 :
ValSel<View,int>(home,vb) {}
71 :
ValSel<View,int>(home,vb) {}
85 :
ValSel<View,int>(home,vb) {}
93 return (
x.width() == 2U) ?
x.min() : ((
x.min()+
x.max()) / 2);
99 :
ValSel<View,int>(home,vb),
r(vb.rnd()) {}
109 unsigned int p =
r(
x.size());
112 return i.min() + static_cast<int>(
p);
138 return (
x.width() == 2) ?
x.min() : (
x.min() + (
x.max()-
x.min())/2);
154 return (
x.width() == 2) ?
x.max() : (
x.max() - (
x.max()-
x.min())/2);
int val(const Space &home, View x, int i)
Return value of view x at position i.
void dispose(Space &home)
Delete value selection.
Rnd r
The used random number generator.
Range iterator for integer variable views
Range iterator for integer views.
Value selection class for mimimum of view.
Value selection class for average of view.
Value selection class for random value of view.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int val(const Space &home, View x, int i)
Return value of view x at position i.
Value selection class for minimum range of integer view.
ValSelMax(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
Value selection class for maximum of view.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
int val(const Space &home, View x, int i)
Return value of view x at position i.
Post propagator for SetVar SetOpType SetVar SetRelType r
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void update(Space &home, bool share, SharedHandle &sh)
Updating during cloning.
Integer view for integer variables.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Value branching information.
Value selection class for median of view.
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
ValSelRnd(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
ValSelAvg(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
ValSelMin(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Post propagator for SetVar x
ValSelMed(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
ValSelRangeMax(Space &home, const ValBranch< IntVar > &vb)
Constructor for initialization.
Gecode toplevel namespace
Value selection class for maximum range of integer view.
#define GECODE_NEVER
Assert that this command is never executed.
ValSelRangeMin(Space &home, const ValBranch< IntVar > &vb)
Constructor for initialization.
Base class for value selection.
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.