Go to the documentation of this file.
40 namespace Gecode {
namespace Int {
namespace Arithmetic {
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>
110 switch (
equal(x0,0)) {
117 switch (
equal(x1,1)) {
134 template<
class View, PropCond pc>
139 template<
class View, PropCond pc>
145 template<
class View, PropCond pc>
148 switch (
equal(x0,0)) {
155 switch (
equal(x1,1)) {
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>
239 return prop_mult_plus_bnd<VA,VB,VC>(home,*
this,x0,x1,x2);
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>
325 IntView y0(x0.varimp()), y1(x1.varimp()), y2(x2.varimp());
326 return prop_mult_dom<IntView>(home,*
this,y0,y1,y2);
329 template<
class VA,
class VB,
class VC>
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
long long int mll(long long int x, long long int y)
Multiply x and \y.
Bounds consistent positive multiplication propagator.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
bool pos(const View &x)
Test whether x is postive.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
long long int ll(int x)
Cast x into a long long int.
ExecStatus ES_SUBSUMED(Propagator &p)
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
Bounds consistent multiplication propagator.
Support value iterator and recorder
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Domain consistent multiplication propagator.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
Base-class for both propagators and branchers.
@ RT_TRUE
Relation does hold.
MultDom(Space &home, MultDom &p)
Constructor for cloning p.
IntType floor_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus prop_mult_plus_bnd(Space &home, Propagator &p, VA x0, VB x1, VC x2)
Mixed ternary propagator.
MultPlusDom(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
long long int ill(int x)
Increment x by one.
ExecStatus prop_mult_dom(Space &home, Propagator &p, View x0, View x1, View x2)
Gecode toplevel namespace
Domain consistent positive multiplication propagator.
Base-class for propagators.
@ RT_MAYBE
Relation may hold or not.
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
@ RT_FALSE
Relation does not hold.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
void support(void)
Mark current (iterator) value as supported.
Home class for posting propagators
MultZeroOne(Space &home, MultZeroOne< View, pc > &p)
Constructor for cloning p.
bool any(const View &x)
Test whether x is neither positive nor negative.
Post propagator for SetVar SetOpType SetVar SetRelType r
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
MultBnd(Space &home, MultBnd &p)
Constructor for cloning p.
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
#define GECODE_NEVER
Assert that this command is never executed.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Bounds or domain consistent propagator for .
int ModEvent
Type for modification events.
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
bool neg(const View &x)
Test whether x is negative.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
IntType ceil_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
long long int dll(int x)
Decrement x by one.
@ ES_FIX
Propagation has computed fixpoint.
static RelTest equal(View x, int n)
Test whether x is equal to n.
Integer view for integer variables.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
ModEvent tell(Space &home)
Remove all unsupported values.
RelTest
Result of testing relation.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
MultPlusBnd(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
int n
Number of negative literals for node type.
@ ES_FAILED
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.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.