Go to the documentation of this file.
38 namespace Gecode {
namespace Int {
namespace Channel {
56 bool doval(
void)
const;
58 bool dodom(
void)
const;
76 view.update(home,vi.
view);
a = vi.
a;
82 return !
a && view.assigned();
107 template<
class View,
class Offset,
class Info>
114 int j = ox(
x[
i].view).val();
126 for (
int k=0; k<
i; k++) {
144 for (
int k=
i+1; k<
n; k++) {
162 }
while (!xa.
empty());
167 template<
class View,
class Offset,
class Info>
173 return doprop_val<View,Offset,Info>(home,
n,
x,ox,
y,oy,n_na,xa,ya);
180 template<
class View,
class Offset,
bool shared>
186 template<
class View,
class Offset,
bool shared>
191 template<
class View,
class Offset,
bool shared>
197 template<
class View,
class Offset,
bool shared>
208 for (
int i=0;
i<
n;
i++) {
216 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
219 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
221 }
while (!xa.
empty());
228 template<
class View,
class Offset,
bool shared>
238 for (
int i=0;
i<
n;
i++) {
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
bool me_failed(ModEvent me)
Check whether modification event me is failed.
Converter with fixed offset.
ExecStatus ES_SUBSUMED(Propagator &p)
bool a
Whether it has been propagated that view is assigned.
void done(void)
Update the cardinality and bounds information after pruning.
Stack with fixed number of elements.
Base-class for both propagators and branchers.
static ExecStatus post(Home home, int n, ValInfo< View > *xy, Offset &ox, Offset &oy)
Post propagator for channeling.
bool assigned(void) const
Test whether view is assigned.
Base-class for channel propagators.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
bool dodom(void) const
Check whether propagation for domain is to be done.
Gecode toplevel namespace
virtual Actor * copy(Space &home)
Copy propagator during cloning.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Home class for posting propagators
ExecStatus prop_val(Space &home, int n, Info *x, Offset &ox, Info *y, Offset &oy, int &n_na, ProcessStack &xa, ProcessStack &ya)
ExecStatus doprop_val(Space &home, int n, Info *x, Offset &ox, Info *y, Offset &oy, int &n_na, ProcessStack &xa, ProcessStack &ya)
Post propagator for SetVar SetOpType SetVar SetRelType r
bool empty(void) const
Test whether stack is empty.
T pop(void)
Pop topmost element from stack and return it.
void update(Space &home, ValInfo< View > &vi)
Update during cloning.
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
int ModEvent
Type for modification events.
bool shared(ViewArray< ViewX > x, ViewArray< ViewY > y)
void removed(int i)
Record that one value got removed.
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)
Naive channel propagator.
@ ES_FIX
Propagation has computed fixpoint.
bool doval(void) const
Check whether propagation for assignment is to be done.
void push(const T &x)
Push element x on top of stack.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
Val(Space &home, Val &p)
Constructor for cloning p.
int n
Number of negative literals for node type.
void assigned(void)
Record that view got assigned.
@ ES_FAILED
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
@ ES_NOFIX
Propagation has not computed fixpoint.
Gecode::IntArgs i({1, 2, 3, 4})
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
void init(View x, int n)
Initialize.
Combine view with information for value propagation.