38 namespace Gecode {
namespace Int {
namespace Branch {
63 int val(
unsigned int a)
const;
66 virtual size_t size(
void)
const;
69 virtual ~PosValuesChoice(
void);
72 virtual void archive(
Archive& e)
const;
80 PosMin* m = l + (r-
l)/2;
83 }
else if (a >= (m+1)->pos) {
86 return m->min +
static_cast<int>(a - m->pos);
94 template<
int n,
bool min>
102 template<
int n,
bool min>
110 template<
int n,
bool min>
116 template<
int n,
bool min>
122 template<
int n,
bool min>
130 template<
int n,
bool min>
140 template<
int n,
bool min>
151 template<
int n,
bool min>
154 unsigned int a)
const {
162 template<
int n,
bool min>
165 unsigned int a, std::ostream& o)
const {
172 vvp(home,*
this,a,
x,pvc.
pos().
pos,nn,o);
174 o <<
"var[" << pvc.
pos().
pos <<
"] = " << nn;
const Pos & pos(void) const
Return position in array.
int val(unsigned int a) const
Return value to branch with for alternative a.
static BrancherHandle post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], BranchFilter bf, IntVarValPrint vvp)
Constructor for creation.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Generic brancher by view selection.
bool pos(const View &x)
Test whether x is postive.
unsigned int alternatives(void) const
Return number of alternatives.
No-good literal for equality.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
Brancher by view and values selection
Base-class for both propagators and branchers.
Gecode::FloatVal c(-8, 8)
Pos pos(Space &home)
Return position information.
int p
Number of positive literals for node type.
Base-class for branchers.
ViewValuesBrancher(Space &home, bool shared, ViewValuesBrancher &b)
Constructor for cloning b.
int n
Number of negative literals for node type.
Execution has resulted in failure.
unsigned int size(I &i)
Size of all ranges of range iterator i.
virtual Actor * copy(Space &home, bool share)
Perform cloning.
Choice storing position and values for integer views
virtual const Choice * choice(Space &home)
Return choice.
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
Choice for performing commit
void(* IntVarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)
Function type for printing branching alternatives for integer variables.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
#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.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
No-good literal recorded during search.