38 namespace Gecode {
namespace Int {
namespace Branch {
63 int val(
unsigned int a)
const;
66 virtual ~PosValuesChoice(
void);
69 virtual void archive(
Archive& e)
const;
77 PosMin* m = l + (r-
l)/2;
80 }
else if (a >= (m+1)->pos) {
83 return m->min +
static_cast<int>(a - m->pos);
91 template<
int n,
bool min,
class Filter,
class Pr
int>
103 template<
int n,
bool min,
class Filter,
class Pr
int>
113 template<
int n,
bool min,
class Filter,
class Pr
int>
119 template<
int n,
bool min,
class Filter,
class Pr
int>
126 template<
int n,
bool min,
class Filter,
class Pr
int>
134 template<
int n,
bool min,
class Filter,
class Pr
int>
145 template<
int n,
bool min,
class Filter,
class Pr
int>
156 template<
int n,
bool min,
class Filter,
class Pr
int>
159 unsigned int a)
const {
167 template<
int n,
bool min,
class Filter,
class Pr
int>
172 std::ostream& o)
const {
179 p(home,*
this,a,x,pvc.
pos().
pos,nn,o);
181 o <<
"var[" << pvc.
pos().
pos <<
"] = " << nn;
184 template<
int n,
bool min,
class Filter,
class Pr
int>
193 template<
int n,
bool min>
unsigned int alternatives(void) const
Return number of alternatives.
ViewValuesBrancher(Space &home, ViewValuesBrancher &b)
Constructor for cloning b.
Actor must always be disposed.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
Generic brancher by view selection.
bool pos(const View &x)
Test whether x is postive.
virtual const Choice * choice(Space &home)
Return choice.
ViewArray< IntView > x
Views to branch on.
Class storing a print function.
const Pos & pos(void) const
Return position in array.
No-good literal for equality.
Class without print function.
Brancher by view and values selection
Base-class for both propagators and branchers.
ViewSel< IntView > * vs[n]
View selection objects.
Pos pos(Space &home)
Return position information.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Base-class for branchers.
int n
Number of negative literals for node type.
Execution has resulted in failure.
virtual Actor * copy(Space &home)
Perform cloning.
Choice storing position and values for integer views
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
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.
Post propagator for SetVar SetOpType SetVar SetRelType r
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Integer view for integer variables.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
static void post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post function for creation.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
Choice for performing commit
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
Post propagator for SetVar x
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
Gecode toplevel namespace
int val(unsigned int a) const
Return value to branch with for alternative a.
#define GECODE_VTABLE_EXPORT
const int pos
Position of view.
#define GECODE_INT_EXPORT
Home class for posting propagators
#define GECODE_NEVER
Assert that this command is never executed.
void postviewvaluesbrancher(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post brancher for view and values.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
No-good literal recorded during search.