58 const Val& val(
void)
const;
60 virtual size_t size(
void)
const;
62 virtual void archive(
Archive& e)
const;
67 template<
class View,
class Val, PropCond pc>
94 template<
class View,
int n,
class Val,
unsigned int a>
105 typename View::VarType
x,
int i,
136 std::ostream& o)
const;
158 const Pos&
p,
const Val&
n)
185 template<
class View,
class Val, PropCond pc>
188 :
NGL(home),
x(x0),
n(n0) {}
190 template<
class View,
class Val, PropCond pc>
193 :
NGL(home,share,ngl),
n(ngl.
n) {
194 x.update(home,share,ngl.
x);
197 template<
class View,
class Val, PropCond pc>
200 x.subscribe(home,p,pc);
203 template<
class View,
class Val, PropCond pc>
209 template<
class View,
class Val, PropCond pc>
213 return sizeof(*this);
222 template<
class View,
int n,
class Val,
unsigned int a>
231 :
ViewBrancher<View,n>(home,x,vs,bf), vsc(vsc0), vvp(vvp0) {
236 template<
class View,
int n,
class Val,
unsigned int a>
246 template<
class View,
int n,
class Val,
unsigned int a>
251 vsc(b.vsc->copy(home,shared)), vvp(b.vvp) {}
253 template<
class View,
int n,
class Val,
unsigned int a>
259 template<
class View,
int n,
class Val,
unsigned int a>
267 template<
class View,
int n,
class Val,
unsigned int a>
276 template<
class View,
int n,
class Val,
unsigned int a>
289 template<
class View,
int n,
class Val,
unsigned int a>
295 return vsc->ngl(home,b,
299 template<
class View,
int n,
class Val,
unsigned int a>
303 std::ostream& o)
const {
309 vvp(home,*
this,b,y,pvc.
pos().
pos,pvc.
val(),o);
311 vsc->print(home,b,xi,pvc.
pos().
pos,pvc.
val(),o);
314 template<
class View,
int n,
class Val,
unsigned int a>
virtual size_t dispose(Space &home)
Dispose.
const Pos & pos(void) const
Return position in array.
virtual void cancel(Space &home, Propagator &p)
Cancel subscription for no-good literal.
ValSelCommitBase< View, Val > * vsc
Value selection and commit object.
const Val & val(void) const
Return value to branch with.
BranchFilter bf
Branch filter 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.
Actor must always be disposed.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int b) const
Create no-good literal for choice c and alternative b.
BranchTraits< typename View::VarType >::Filter BranchFilter
The branch filter that corresponds to the var type.
Generic brancher by view selection.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int b)
Perform commit for choice c and alternative b.
Base-class for propagators.
static BrancherHandle post(Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter bf, VarValPrint vvp)
Brancher post function.
Base-class for both propagators and branchers.
virtual Actor * copy(Space &home, bool share)
Perform cloning.
Gecode::FloatVal c(-8, 8)
Pos pos(Space &home)
Return position information.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Base-class for branchers.
int n
Number of negative literals for node type.
Execution has resulted in failure.
Generic brancher by view and value selection.
ViewSel< View > * vs[n]
View selection objects.
View view(const Pos &p) const
Return view according to position information p.
unsigned int size(I &i)
Size of all ranges of range iterator i.
virtual void subscribe(Space &home, Propagator &p)
Create subscription for no-good literal.
VarValPrint vvp
Print function.
ViewValBrancher(Space &home, bool share, ViewValBrancher &b)
Constructor for cloning b.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual void archive(Archive &e) const
Archive into e.
virtual const Choice * choice(Space &home)
Return choice.
Node * x
Pointer to corresponding Boolean expression node.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Choice for performing commit
ViewValNGL(Space &home, View x, Val n)
Initialize for propagator p with view x and value n.
View-value no-good literal.
virtual size_t dispose(Space &home)
Dispose.
void(* VarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o)
Function type for printing variable and value selection.
virtual bool notice(void) const =0
Whether dispose must always be called (that is, notice is needed)
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
virtual size_t size(void) const
Report size occupied.
#define GECODE_VTABLE_EXPORT
const int pos
Position of view.
virtual void archive(Archive &e) const
Archive into e.
ViewArray< View > x
Views to branch on.
Home class for posting propagators
Choice storing position and value
struct Gecode::@518::NNF::@57::@59 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.
No-good literal recorded during search.