Go to the documentation of this file.
38 namespace Gecode {
namespace Int {
namespace Channel {
44 template<
class View,
class Offset>
60 bool doval(
void)
const;
62 bool dodom(
void)
const;
71 template<
class View,
class Offset>
75 size = static_cast<unsigned int>(
n);
80 template<
class View,
class Offset>
83 view.update(home,di.
view);
89 template<
class View,
class Offset>
92 return (
size != 1) && view.assigned();
95 template<
class View,
class Offset>
98 return size != view.size();
101 template<
class View,
class Offset>
107 template<
class View,
class Offset>
117 template<
class View,
class Offset>
126 template<
class View,
class Offset>
130 for (
int i=0;
i<
n;
i++)
167 template<
class View,
class Offset,
bool shared>
173 template<
class View,
class Offset,
bool shared>
178 template<
class View,
class Offset,
bool shared>
184 template<
class View,
class Offset,
bool shared>
194 template<
class View,
class Offset,
bool shared>
198 const int n = this->
n;
208 for (
int i=0;
i<
n;
i++) {
217 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
220 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
228 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
231 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
233 }
while (!xa.
empty());
245 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
248 if (dc.available()) {
252 for (
int i=0;
i<
n;
i++)
263 for (
int i=0;
i<
n;
i++)
265 int j = ox(
x[
i].view).val();
289 (home,
n,
x,ox,
y,oy,n_na,xa,ya)));
292 (home,
n,
y,oy,
x,ox,n_na,ya,xa)));
296 for (
int i=0;
i<2*
n;
i++)
297 if (!xy[
i].view.assigned())
305 template<
class View,
class Offset,
bool shared>
315 for (
int i=0;
i<
n;
i++) {
ExecStatus prop_dom(Space &home, int n, DomInfo< View, Offset > *x, Offset &ox, DomInfo< View, Offset > *y, Offset &oy, ProcessStack &ya)
int min
Last propagated minimum.
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
bool me_failed(ModEvent me)
Check whether modification event me is failed.
void done(Offset &o)
Update the size and bounds information after pruning.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Converter with fixed offset.
ExecStatus ES_SUBSUMED(Propagator &p)
unsigned int size(I &i)
Size of all ranges of range iterator i.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
bool assigned(View x, int v)
Whether x is assigned to value v.
Stack with fixed number of elements.
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
Base-class for both propagators and branchers.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
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)
bool doval(void) const
Check whether propagation for assignment is to be done.
Gecode toplevel namespace
static ExecStatus post(Home home, int n, DomInfo< View, Offset > *xy, Offset &ox, Offset &oy)
Post propagator for channeling on xy.
Range iterator for integer views.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Domain consistent channel propagator.
void update(Space &home, DomInfo< View, Offset > &vcb)
Update during cloning.
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)
Value iterator from range iterator.
int max
Last propagated maximum.
Post propagator for SetVar SetOpType SetVar SetRelType r
bool empty(void) const
Test whether stack is empty.
Dom(Space &home, Dom &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int ModEvent
Type for modification events.
void removed(int i)
Record that one value got removed.
void assigned(void)
Record that view got assigned.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Combine view with information for domain propagation.
bool shared(ViewArray< ViewX > x, ViewArray< ViewY > y)
Propagation has computed fixpoint.
void push(const T &x)
Push element x on top of stack.
unsigned int size
Last propagated size.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
void init(View x, int n)
Initialize.
int n
Number of negative literals for node type.
Execution has resulted in failure.
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
int ModEventDelta
Modification event deltas.
Propagation has not computed fixpoint.
bool dodom(void) const
Check whether propagation for domain is to be done.
Gecode::IntArgs i({1, 2, 3, 4})
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
int p
Number of positive literals for node type.
Range iterator for computing the complement (described by values)