53 const Val& val(
void)
const;
55 virtual void archive(
Archive& e)
const;
60 template<
class View,
class Val, PropCond pc>
79 virtual size_t dispose(
Space& home);
89 template<
class View,
int n,
class Val,
unsigned int a,
90 class Filter,
class Print>
97 typedef typename View::VarType
Var;
128 std::ostream& o)
const;
132 virtual size_t dispose(
Space& home);
143 template<
class View,
int n,
class Val,
unsigned int a>
160 const Pos&
p,
const Val& n)
181 template<
class View,
class Val, PropCond pc>
184 :
NGL(home),
x(x0), n(n0) {}
186 template<
class View,
class Val, PropCond pc>
189 :
NGL(home,ngl), n(ngl.n) {
190 x.update(home,ngl.
x);
193 template<
class View,
class Val, PropCond pc>
196 x.subscribe(home,p,pc);
199 template<
class View,
class Val, PropCond pc>
205 template<
class View,
class Val, PropCond pc>
208 x.reschedule(home,p,pc);
211 template<
class View,
class Val, PropCond pc>
214 (void) NGL::dispose(home);
215 return sizeof(*this);
224 template<
class View,
int n,
class Val,
unsigned int a,
225 class Filter,
class Print>
234 :
ViewBrancher<View,Filter,n>(home,x,vs,bf), vsc(vsc0),
p(vvp) {
239 template<
class View,
int n,
class Val,
unsigned int a,
240 class Filter,
class Print>
251 template<
class View,
int n,
class Val,
unsigned int a,
252 class Filter,
class Print>
260 template<
class View,
int n,
class Val,
unsigned int a,
261 class Filter,
class Print>
268 template<
class View,
int n,
class Val,
unsigned int a,
269 class Filter,
class Print>
277 template<
class View,
int n,
class Val,
unsigned int a,
278 class Filter,
class Print>
288 template<
class View,
int n,
class Val,
unsigned int a,
289 class Filter,
class Print>
302 template<
class View,
int n,
class Val,
unsigned int a,
303 class Filter,
class Print>
313 template<
class View,
int n,
class Val,
unsigned int a,
314 class Filter,
class Print>
318 std::ostream& o)
const {
323 p(home,*
this,b,xi,pvc.
pos().pos,pvc.
val(),o);
328 template<
class View,
int n,
class Val,
unsigned int a,
329 class Filter,
class Print>
339 template<
class View,
int n,
class Val,
unsigned int a>
ViewValBrancher(Space &home, ViewValBrancher &b)
Constructor for cloning b.
void postviewvalbrancher(Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter< typename View::VarType > bf, VarValPrint< typename View::VarType, Val > vvp)
Post view value brancher.
Actor must always be disposed.
View::VarType Var
The corresponding variable.
Class withot a branch filter function.
void cancel(Space &home, Propagator &p, IntSet &y)
virtual size_t dispose(Space &home)
Delete brancher and return its size.
std::function< void(const Space &home, const Brancher &b, unsigned int a, Var x, int i, const Val &m, std::ostream &o)> VarValPrint
Function type for printing variable and value selection.
Generic brancher by view selection.
Base-class for propagators.
virtual Actor * copy(Space &home)
Perform cloning.
virtual void dispose(Space &home)=0
Delete value selection.
ViewArray< View > x
Views to branch on.
View view(const Pos &p) const
Return view according to position information p.
Class storing a print function.
const Pos & pos(void) const
Return position in array.
Class without print function.
Base-class for both propagators and branchers.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int b)
Perform commit for choice c and alternative b.
ViewSel< View > * 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.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int b) const
Create no-good literal for choice c and alternative b.
Base-class for branchers.
int n
Number of negative literals for node type.
Class storing a branch filter function.
virtual void print(const Space &home, unsigned int a, View x, int i, const Val &n, std::ostream &o) const =0
Print on o branch for alternative a, view x at position i, and value n.
Execution has resulted in failure.
Generic brancher by view and value selection.
void subscribe(Space &home, Propagator &p, IntSet &y)
std::function< bool(const Space &home, Var x, int i)> BranchFilter
Function type for branch filter functions.
ValSelCommitBase< View, Val > * vsc
Value selection and commit object.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
static void post(Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp)
Brancher post function.
virtual void print(const Space &home, const Choice &c, unsigned int b, std::ostream &o) const
Print branch for choice c and alternative b.
const Val & val(void) const
virtual const Choice * choice(Space &home)
Return choice.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual ModEvent commit(Space &home, unsigned int a, View x, int i, Val n)=0
Commit view x at position i to value n for alternative a.
void print(std::basic_ostream< Char, Traits > &s, bool assigned, IL &lb, IU &ub, unsigned int cardMin, unsigned int cardMax)
Print set view.
virtual void archive(Archive &e) const
Archive into e.
Node * x
Pointer to corresponding Boolean expression node.
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const =0
Create no-good literal for choice c and alternative a.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Choice for performing commit
Post propagator for SetVar x
ViewValNGL(Space &home, View x, Val n)
Initialize for propagator p with view x and value n.
View-value no-good literal.
virtual void archive(Archive &e) const
Archive into e.
virtual bool notice(void) const =0
Whether dispose must always be called (that is, notice is needed)
Gecode toplevel namespace
#define GECODE_VTABLE_EXPORT
void reschedule(Space &home, Propagator &p, IntSet &y)
Home class for posting propagators
Choice storing position and value
virtual Val val(const Space &home, View x, int i)=0
Return value of view x at position i.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
PosValChoice(const Brancher &b, unsigned int a, const Pos &p, const Val &n)
Initialize choice for brancher b, number of alternatives a, position p, and value n...
bool me_failed(ModEvent me)
Check whether modification event me is failed.
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
No-good literal recorded during search.