42 namespace Gecode {
namespace Int {
namespace Channel {
48 template<
class View,
class Offset>
64 bool doval(
void)
const;
66 bool dodom(
void)
const;
75 template<
class View,
class Offset>
79 size = static_cast<unsigned int>(
n);
84 template<
class View,
class Offset>
88 view.update(home,share,di.
view);
94 template<
class View,
class Offset>
97 return (
size != 1) && view.assigned();
100 template<
class View,
class Offset>
103 return size != view.size();
106 template<
class View,
class Offset>
112 template<
class View,
class Offset>
122 template<
class View,
class Offset>
131 template<
class View,
class Offset>
135 for (
int i =
n;
i--; )
172 template<
class View,
class Offset,
bool shared>
178 template<
class View,
class Offset,
bool shared>
184 template<
class View,
class Offset,
bool shared>
190 template<
class View,
class Offset,
bool shared>
200 template<
class View,
class Offset,
bool shared>
212 for (
int i =
n;
i--; ) {
221 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
224 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
232 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
235 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
237 }
while (!xa.
empty());
249 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
252 if (dc.available()) {
269 int j = ox(
x[
i].view).val();
293 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
296 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
300 for (
int i=2*
n;
i--; )
301 if (!xy[
i].view.assigned())
309 template<
class View,
class Offset,
bool shared>
319 for (
int i=
n;
i--; ) {
void push(const T &x)
Push element x on top of stack.
ExecStatus prop_val(Space &home, int n, Info *x, Offset &ox, Info *y, Offset &oy, int &n_na, ProcessStack &xa, ProcessStack &ya)
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
bool dodom(void) const
Check whether propagation for domain is to be done.
ExecStatus ES_SUBSUMED(Propagator &p)
void update(Space &home, bool share, DomInfo< View, Offset > &vcb)
Update during cloning.
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool assigned(void) const
Test whether view is assigned.
bool doval(void) const
Check whether propagation for assignment is to be done.
bool empty(void) const
Test whether stack is empty.
int ModEvent
Type for modification events.
void done(Offset &o)
Update the size and bounds information after pruning.
Propagation has computed fixpoint.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Base-class for both propagators and branchers.
Range iterator for integer views.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void assigned(void)
Record that view got assigned.
int n
Number of negative literals for node type.
Execution has resulted in failure.
Dom(Space &home, bool share, Dom &p)
Constructor for cloning p.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
ExecStatus prop_dom(Space &home, int n, DomInfo< View, Offset > *x, Offset &ox, DomInfo< View, Offset > *y, Offset &oy, ProcessStack &ya)
static ExecStatus post(Home home, int n, DomInfo< View, Offset > *xy, Offset &ox, Offset &oy)
Post propagator for channeling on xy.
Value iterator from range iterator.
unsigned int size(I &i)
Size of all ranges of range iterator i.
Domain consistent channel propagator.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
unsigned int size
Last propagated size.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
Converter with fixed offset.
Post propagator for SetVar SetOpType SetVar SetRelType r
Combine view with information for domain propagation.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
Base-class for channel propagators.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
void init(View x, int n)
Initialize.
bool assigned(View x, int v)
Whether x is assigned to value v.
int max
Last propagated maximum.
Stack with fixed number of elements.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
int min
Last propagated minimum.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Post propagator for SetVar x
Propagation has not computed fixpoint.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Gecode toplevel namespace
void removed(int i)
Record that one value got removed.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
bool me_failed(ModEvent me)
Check whether modification event me is failed.
Range iterator for computing the complement (described by values)