59 int val(
unsigned int a)
const;
73 PosMin* m = l + (
r-l)/2;
76 }
else if (a >= (m+1)->
pos) {
79 return m->min +
static_cast<int>(a - m->pos);
87 template<
int n,
bool min,
class Filter,
class Pr
int>
99 template<
int n,
bool min,
class Filter,
class Pr
int>
109 template<
int n,
bool min,
class Filter,
class Pr
int>
115 template<
int n,
bool min,
class Filter,
class Pr
int>
122 template<
int n,
bool min,
class Filter,
class Pr
int>
130 template<
int n,
bool min,
class Filter,
class Pr
int>
141 template<
int n,
bool min,
class Filter,
class Pr
int>
152 template<
int n,
bool min,
class Filter,
class Pr
int>
155 unsigned int a)
const {
163 template<
int n,
bool min,
class Filter,
class Pr
int>
168 std::ostream& o)
const {
175 p(home,*
this,a,
x,pvc.
pos().
pos,nn,o);
177 o <<
"var[" << pvc.
pos().
pos <<
"] = " << nn;
180 template<
int n,
bool min,
class Filter,
class Pr
int>
189 template<
int n,
bool min>
Base-class for both propagators and branchers.
Class without print function.
Class storing a print function.
Base-class for branchers.
Choice for performing commit
unsigned int alternatives(void) const
Return number of alternatives.
Home class for posting propagators
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
No-good literal for equality.
Choice storing position and values for integer views
int val(unsigned int a) const
Return value to branch with for alternative a.
PosValuesChoice(const Brancher &b, const Pos &p, IntView x)
Initialize choice for brancher b, position p, and view x.
virtual void archive(Archive &e) const
Archive into e.
Brancher by view and values selection
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
ViewValuesBrancher(Space &home, ViewValuesBrancher &b)
Constructor for cloning b.
virtual Actor * copy(Space &home)
Perform cloning.
static void post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post function for creation.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
virtual const Choice * choice(Space &home)
Return choice.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
Integer view for integer variables.
No-good literal recorded during search.
const Pos & pos(void) const
Return position in array.
PosChoice(const PosChoice &c)
Initialize.
const int pos
Position of view.
Pos pos(Space &home)
Return position information.
ViewBrancher(Space &home, ViewBrancher< IntView, Filter, n > &b)
View view(const Pos &p) const
Return view according to position information p.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
ViewSel< IntView > * vs[n]
Abstract class for view selection.
#define GECODE_INT_EXPORT
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
@ AP_DISPOSE
Actor must always be disposed.
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
void postviewvaluesbrancher(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post brancher for view and values.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
std::function< void(const Space &home, const Brancher &b, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)> IntVarValPrint
Function type for printing branching alternatives for integer variables.
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
@ ES_OK
Execution is okay.
@ ES_FAILED
Execution has resulted in failure.
Post propagator for SetVar x
#define GECODE_NEVER
Assert that this command is never executed.
#define GECODE_VTABLE_EXPORT