Go to the documentation of this file.
36 #ifndef __GECODE_INT_ARITHMETIC_HH__
37 #define __GECODE_INT_ARITHMETIC_HH__
50 namespace Gecode {
namespace Int {
namespace Arithmetic {
122 namespace Gecode {
namespace Int {
namespace Arithmetic {
248 namespace Gecode {
namespace Int {
namespace Arithmetic {
259 template<
class VA,
class VB,
bool tiebreak>
294 namespace Gecode {
namespace Int {
namespace Arithmetic {
305 bool even(
void)
const;
311 template<
class IntType>
314 int tpow(
int x)
const;
332 static bool even(
int m);
334 bool powgr(
long long int r,
int x)
const;
336 bool powle(
long long int r,
int x)
const;
341 bool even(
void)
const;
347 template<
class IntType>
350 int tpow(
int x)
const;
361 namespace Gecode {
namespace Int {
namespace Arithmetic {
368 template<
class VA,
class VB,
class Ops>
419 template<
class VA,
class VB,
class Ops>
485 namespace Gecode {
namespace Int {
namespace Arithmetic {
493 template<
class Ops,
bool minus>
545 template<
class Ops,
bool minus>
611 namespace Gecode {
namespace Int {
namespace Arithmetic {
619 template<
class View, PropCond pc>
647 template<
class VA,
class VB,
class VC>
702 template<
class VA,
class VB,
class VC>
769 namespace Gecode {
namespace Int {
namespace Arithmetic {
776 template<
class VA,
class VB,
class VC>
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
Post propagator for SetVar x
NrootDom(Space &home, NrootDom< Ops > &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Bounds consistent positive multiplication propagator.
PowBnd(Space &home, PowBnd &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
DivPlusBnd(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int exp(void) const
Return exponent.
int fnroot(int x) const
Return where x must be non-negative and .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int exp(void) const
Return exponent.
Domain consistent positive power propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Bounds consistent multiplication propagator.
Positive bounds consistent n-th root propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Operations for square and square-root propagators.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Domain consistent multiplication propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Bounds consistent absolute value propagator.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Base-class for both propagators and branchers.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
DivBnd(Space &home, DivBnd< View > &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
static ExecStatus post(Home home, VA x0, VB x1, Ops ops)
Post propagator.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
static ExecStatus post(Home home, View x0, View x1)
Post bounds consistent propagator .
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
MultDom(Space &home, MultDom &p)
Constructor for cloning p.
ArgMax(Space &home, ArgMax &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ViewArray< View > x
Array of views.
bool powle(long long int r, int x) const
Test whether .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Mixed ternary propagator.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Bounds consistent division propagator.
static ExecStatus post(Home home, View x0, View x1)
Post domain consistent propagator .
MultPlusDom(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
PowPlusBnd(Home home, VA x0, VB x1, const Ops &ops)
Constructor for posting.
static ExecStatus post(Home home, VA x0, VB x1, Ops ops)
Post propagator.
Bounds consistent positive division propagator.
int fnroot(int x) const
Return where x must be non-negative and .
IntType pow(IntType x) const
Return where .
Gecode toplevel namespace
Domain consistent positive multiplication propagator.
Base-class for propagators.
PowDom(Space &home, PowDom< Ops > &p)
Constructor for cloning p.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
virtual void reschedule(Space &home)
Schedule function.
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
Operations for power and nroot propagators.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
#define GECODE_INT_EXPORT
Argument maximum propagator.
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Domain consistent n-ary maximum propagator.
Bounds consistent ternary maximum propagator.
NrootPlusDom(Space &home, NrootPlusDom< Ops, minus > &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
IntType pow(IntType x) const
Return .
MultZeroOne(Space &home, MultZeroOne< View, pc > &p)
Constructor for cloning p.
int tpow(int x) const
Return truncated to integer limits.
Domain consistent power propagator.
Post propagator for SetVar SetOpType SetVar SetRelType r
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
AbsDom(Space &home, AbsDom &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
ModEventDelta med
A set of modification events (used during propagation)
MaxDom(Space &home, MaxDom &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
bool even(void) const
Return whether exponent is even.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
Domain consistent ternary maximum propagator.
MultBnd(Space &home, MultBnd &p)
Constructor for cloning p.
Bounds consistent power propagator.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator (rounding towards 0)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
MaxBnd(Space &home, MaxBnd &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
NrootBnd(Space &home, NrootBnd< Ops > &p)
Constructor for cloning p.
NaryMaxBnd(Space &home, NaryMaxBnd &p)
Constructor for cloning p.
Bounds or domain consistent propagator for .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
PowPlusDom(Home home, VA x0, VB x1, const Ops &ops)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
NrootPlusBnd(Space &home, NrootPlusBnd< Ops, minus > &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Domain consistent absolute value propagator.
int cnroot(int x) const
Return where x must be non-negative and .
IntType
Description of integer types.
int tpow(int x) const
Return where truncated to integer limits.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Domain consistent n-th root propagator.
static RelTest equal(View x, int n)
Test whether x is equal to n.
static ExecStatus post(Home home, IdxViewArray< VA > &x, VB y)
Post propagator .
AbsBnd(Space &home, AbsBnd &p)
Constructor for cloning p.
Integer view for integer variables.
int cnroot(int x) const
Return where x must be non-negative and .
PowOps(int n)
Initialize with exponent n.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Integer division/modulo propagator.
DivMod(Space &home, DivMod< View > &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
RelTest
Result of testing relation.
Bounds consistent n-ary maximum propagator.
MultPlusBnd(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
bool even(void) const
Return whether exponent is even.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator (rounding towards 0)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Domain consistent n-th root propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
IdxViewArray< VA > x
Map of index and views.
Bounds consistent n-th root propagator.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
int n
Number of negative literals for node type.
int n
The exponent and root index.
NaryMaxDom(Space &home, NaryMaxDom &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
int ModEventDelta
Modification event deltas.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
int p
Number of positive literals for node type.
VB y
Position of maximum view (maximal argument)
bool powgr(long long int r, int x) const
Test whether .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Bounds consistent positive power propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.