48 mll(
long long int x,
long long int y) {
54 return static_cast<long long int>(
x);
59 return static_cast<long long int>(
x) + 1;
64 return static_cast<long long int>(
x) - 1;
83 return (
x.min() <= 0) && (
x.max() >= 0);
92 template<
class View, PropCond pc>
97 template<
class View, PropCond pc>
107 template<
class View, PropCond pc>
134 template<
class View, PropCond pc>
139 template<
class View, PropCond pc>
145 template<
class View, PropCond pc>
176 template<
class VA,
class VB,
class VC>
214 return x0.assigned() && x1.assigned() ?
218 template<
class VA,
class VB,
class VC>
224 template<
class VA,
class VB,
class VC>
230 template<
class VA,
class VB,
class VC>
236 template<
class VA,
class VB,
class VC>
242 template<
class VA,
class VB,
class VC>
278 s0.support(); s1.support();
290 template<
class VA,
class VB,
class VC>
296 template<
class VA,
class VB,
class VC>
302 template<
class VA,
class VB,
class VC>
308 template<
class VA,
class VB,
class VC>
318 template<
class VA,
class VB,
class VC>
329 template<
class VA,
class VB,
class VC>
Base-class for both propagators and branchers.
BinaryPropagator(Space &home, BinaryPropagator &p)
Constructor for cloning p.
Home class for posting propagators
MultBnd(Space &home, MultBnd &p)
Constructor for cloning p.
MultDom(Space &home, MultDom &p)
Constructor for cloning p.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
MultPlusBnd(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
MultPlusDom(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
MultZeroOne(Space &home, MultZeroOne< View, pc > &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
static RelTest equal(View x, int n)
Test whether x is equal to n.
Integer view for integer variables.
Support value iterator and recorder
void support(void)
Mark current (iterator) value as supported.
ModEvent tell(Space &home)
Remove all unsupported values.
MixTernaryPropagator(Space &home, MixTernaryPropagator &p)
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
Base-class for propagators.
ModEventDelta med
A set of modification events (used during propagation)
TernaryPropagator(Space &home, TernaryPropagator &p)
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
Numerical (arithmetic) propagators.
long long int dll(int x)
Decrement x by one.
bool pos(const View &x)
Test whether x is postive.
bool any(const View &x)
Test whether x is neither positive nor negative.
long long int mll(long long int x, long long int y)
Multiply x and \y.
ExecStatus prop_mult_plus_bnd(Space &home, Propagator &p, VA x0, VB x1, VC x2)
ExecStatus prop_mult_dom(Space &home, Propagator &p, View x0, View x1, View x2)
long long int ill(int x)
Increment x by one.
bool neg(const View &x)
Test whether x is negative.
long long int ll(int x)
Cast x into a long long int.
IntType ceil_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
IntType floor_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
RelTest
Result of testing relation.
@ RT_TRUE
Relation does hold.
@ RT_MAYBE
Relation may hold or not.
@ RT_FALSE
Relation does not hold.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
Post propagator for SetVar x
int ModEvent
Type for modification events.
#define GECODE_NEVER
Assert that this command is never executed.