Generated on Sat Apr 10 2021 00:00:00 for Gecode by doxygen 1.9.1
arithmetic.cpp File Reference

Go to the source code of this file.

Functions

void Gecode::abs (Home home, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ |x_0|=x_1$. More...
 
void Gecode::max (Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \max\{x_0,x_1\}=x_2$. More...
 
void Gecode::max (Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \max x=y$. More...
 
void Gecode::min (Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \min\{x_0,x_1\}=x_2$. More...
 
void Gecode::min (Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \min x=y$. More...
 
void Gecode::argmax (Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmax}(x)=y$. More...
 
void Gecode::argmax (Home home, const IntVarArgs &x, int o, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmax}(x)+o=y$. More...
 
void Gecode::argmin (Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmin}(x)=y$. More...
 
void Gecode::argmin (Home home, const IntVarArgs &x, int o, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmin}(x)+o=y$. More...
 
void Gecode::argmax (Home home, const BoolVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmax}(x)=y$. More...
 
void Gecode::argmax (Home home, const BoolVarArgs &x, int o, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmax}(x)-o=y$. More...
 
void Gecode::argmin (Home home, const BoolVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmin}(x)=y$. More...
 
void Gecode::argmin (Home home, const BoolVarArgs &x, int o, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
 Post propagator for $ \operatorname{argmin}(x)-o=y$. More...
 
void Gecode::mult (Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
 Post propagator for $x_0\cdot x_1=x_2$. More...
 
void Gecode::divmod (Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel ipl=IPL_DEF)
 Post propagator for $x_0\ \mathrm{div}\ x_1=x_2 \land x_0\ \mathrm{mod}\ x_1 = x_3$. More...
 
void Gecode::div (Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
 Post propagator for $x_0\ \mathrm{div}\ x_1=x_2$. More...
 
void Gecode::mod (Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
 Post propagator for $x_0\ \mathrm{mod}\ x_1=x_2$. More...
 
void Gecode::sqr (Home home, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
 Post propagator for $x_0^2=x_1$. More...
 
void Gecode::sqrt (Home home, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
 Post propagator for $\lfloor\sqrt{x_0}\rfloor=x_1$. More...
 
void Gecode::pow (Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl=IPL_DEF)
 Post propagator for $x_0^n=x_1$. More...
 
void Gecode::nroot (Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl=IPL_DEF)
 Post propagator for $\lfloor\sqrt[n]{x_0}\rfloor=x_1$. More...
 

Function Documentation

◆ abs()

void Gecode::abs ( Home  home,
IntVar  x0,
IntVar  x1,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ |x_0|=x_1$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Definition at line 39 of file arithmetic.cpp.

◆ max() [1/2]

void Gecode::max ( Home  home,
IntVar  x0,
IntVar  x1,
IntVar  x2,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \max\{x_0,x_1\}=x_2$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Definition at line 51 of file arithmetic.cpp.

◆ max() [2/2]

void Gecode::max ( Home  home,
const IntVarArgs x,
IntVar  y,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \max x=y$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

If x is empty, an exception of type Int::TooFewArguments is thrown.

Definition at line 63 of file arithmetic.cpp.

◆ min() [1/2]

void Gecode::min ( Home  home,
IntVar  x0,
IntVar  x1,
IntVar  x2,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \min\{x_0,x_1\}=x_2$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Definition at line 78 of file arithmetic.cpp.

◆ min() [2/2]

void Gecode::min ( Home  home,
const IntVarArgs x,
IntVar  y,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \min x=y$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

If x is empty, an exception of type Int::TooFewArguments is thrown.

Definition at line 91 of file arithmetic.cpp.

◆ argmax() [1/4]

void Gecode::argmax ( Home  home,
const IntVarArgs x,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmax}(x)=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 110 of file arithmetic.cpp.

◆ argmax() [2/4]

void Gecode::argmax ( Home  home,
const IntVarArgs x,
int  o,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmax}(x)+o=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 136 of file arithmetic.cpp.

◆ argmin() [1/4]

void Gecode::argmin ( Home  home,
const IntVarArgs x,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmin}(x)=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 163 of file arithmetic.cpp.

◆ argmin() [2/4]

void Gecode::argmin ( Home  home,
const IntVarArgs x,
int  o,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmin}(x)+o=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 189 of file arithmetic.cpp.

◆ argmax() [3/4]

void Gecode::argmax ( Home  home,
const BoolVarArgs x,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmax}(x)=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 216 of file arithmetic.cpp.

◆ argmax() [4/4]

void Gecode::argmax ( Home  home,
const BoolVarArgs x,
int  o,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmax}(x)-o=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 240 of file arithmetic.cpp.

◆ argmin() [3/4]

void Gecode::argmin ( Home  home,
const BoolVarArgs x,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmin}(x)=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 265 of file arithmetic.cpp.

◆ argmin() [4/4]

void Gecode::argmin ( Home  home,
const BoolVarArgs x,
int  o,
IntVar  y,
bool  tiebreak = true,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $ \operatorname{argmin}(x)-o=y$.

In case of ties, the smallest value for y is chosen (provided tiebreak is true).

If x is empty, an exception of type Int::TooFewArguments is thrown. If y occurs in x, an exception of type Int::ArgumentSame is thrown.

Definition at line 289 of file arithmetic.cpp.

◆ mult()

void Gecode::mult ( Home  home,
IntVar  x0,
IntVar  x1,
IntVar  x2,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $x_0\cdot x_1=x_2$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Definition at line 314 of file arithmetic.cpp.

◆ divmod()

void Gecode::divmod ( Home  home,
IntVar  x0,
IntVar  x1,
IntVar  x2,
IntVar  x3,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $x_0\ \mathrm{div}\ x_1=x_2 \land x_0\ \mathrm{mod}\ x_1 = x_3$.

Supports bounds consistency (ipl = IPL_BND, default).

Definition at line 327 of file arithmetic.cpp.

◆ div()

void Gecode::div ( Home  home,
IntVar  x0,
IntVar  x1,
IntVar  x2,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $x_0\ \mathrm{div}\ x_1=x_2$.

Supports bounds consistency (ipl = IPL_BND, default).

Definition at line 351 of file arithmetic.cpp.

◆ mod()

void Gecode::mod ( Home  home,
IntVar  x0,
IntVar  x1,
IntVar  x2,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $x_0\ \mathrm{mod}\ x_1=x_2$.

Supports bounds consistency (ipl = IPL_BND, default).

Definition at line 360 of file arithmetic.cpp.

◆ sqr()

void Gecode::sqr ( Home  home,
IntVar  x0,
IntVar  x1,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $x_0^2=x_1$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Definition at line 369 of file arithmetic.cpp.

◆ sqrt()

void Gecode::sqrt ( Home  home,
IntVar  x0,
IntVar  x1,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $\lfloor\sqrt{x_0}\rfloor=x_1$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Definition at line 383 of file arithmetic.cpp.

◆ pow()

void Gecode::pow ( Home  home,
IntVar  x0,
int  n,
IntVar  x1,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $x_0^n=x_1$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Throws an exception of type Int::OutOfLimits, if n is negative.

Definition at line 397 of file arithmetic.cpp.

◆ nroot()

void Gecode::nroot ( Home  home,
IntVar  x0,
int  n,
IntVar  x1,
IntPropLevel  ipl = IPL_DEF 
)

Post propagator for $\lfloor\sqrt[n]{x_0}\rfloor=x_1$.

Supports both bounds consistency (ipl = IPL_BND, default) and domain consistency (ipl = IPL_DOM).

Throws an exception of type Int::OutOfLimits, if n is not strictly positive.

Definition at line 416 of file arithmetic.cpp.