34namespace Gecode {
namespace Int {
namespace Branch {
59 int val(
unsigned int a)
const;
65 virtual void archive(
Archive& e)
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 {
177 o <<
"var[" << pvc.
pos().
pos <<
"] = " << nn;
180 template<
int n,
bool min,
class Filter,
class Pr
int>
189 template<
int n,
bool min>
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Node * x
Pointer to corresponding Boolean expression node.
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.
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.
const int pos
Position of view.
Generic brancher by view selection.
Pos pos(Space &home)
Return position information.
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