arithmetic.cpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2002
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include <gecode/int/arithmetic.hh>
namespace Gecode {
void
abs(Home home, IntVar x0, IntVar x1, IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::AbsDom<IntView>::post(home,x0,x1));
} else {
GECODE_ES_FAIL(Arithmetic::AbsBnd<IntView>::post(home,x0,x1));
}
}
void
max(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::MaxDom<IntView>::post(home,x0,x1,x2));
} else {
GECODE_ES_FAIL(Arithmetic::MaxBnd<IntView>::post(home,x0,x1,x2));
}
}
void
max(Home home, const IntVarArgs& x, IntVar y,
IntPropLevel ipl) {
using namespace Int;
if (x.size() == 0)
throw TooFewArguments("Int::max");
GECODE_POST;
ViewArray<IntView> xv(home,x);
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::NaryMaxDom<IntView>::post(home,xv,y));
} else {
GECODE_ES_FAIL(Arithmetic::NaryMaxBnd<IntView>::post(home,xv,y));
}
}
void
min(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
MinusView m0(x0); MinusView m1(x1); MinusView m2(x2);
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::MaxDom<MinusView>::post(home,m0,m1,m2));
} else {
GECODE_ES_FAIL(Arithmetic::MaxBnd<MinusView>::post(home,m0,m1,m2));
}
}
void
min(Home home, const IntVarArgs& x, IntVar y,
IntPropLevel ipl) {
using namespace Int;
if (x.size() == 0)
throw TooFewArguments("Int::min");
GECODE_POST;
ViewArray<MinusView> m(home,x.size());
for (int i=0; i<x.size(); i++)
m[i] = MinusView(x[i]);
MinusView my(y);
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::NaryMaxDom<MinusView>::post(home,m,my));
} else {
GECODE_ES_FAIL(Arithmetic::NaryMaxBnd<MinusView>::post(home,m,my));
}
}
void
argmax(Home home, const IntVarArgs& x, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
if (x.size() == 0)
throw TooFewArguments("Int::argmax");
if (same(x,y))
throw ArgumentSame("Int::argmax");
GECODE_POST;
// Constrain y properly
IntView yv(y);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<IntView> ix(home,x.size());
for (int i=0; i<x.size(); i++) {
ix[i].idx=i; ix[i].view=x[i];
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<IntView,IntView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<IntView,IntView,false>
::post(home,ix,yv)));
}
void
argmax(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
Limits::nonnegative(o,"Int::argmax");
if (x.size() == 0)
throw TooFewArguments("Int::argmax");
if (same(x,y))
throw ArgumentSame("Int::argmax");
GECODE_POST;
// Constrain y properly
OffsetView yv(y,-o);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<IntView> ix(home,x.size());
for (int i=0; i<x.size(); i++) {
ix[i].idx=i; ix[i].view=x[i];
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<IntView,OffsetView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<IntView,OffsetView,false>
::post(home,ix,yv)));
}
void
argmin(Home home, const IntVarArgs& x, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
if (x.size() == 0)
throw TooFewArguments("Int::argmin");
if (same(x,y))
throw ArgumentSame("Int::argmin");
GECODE_POST;
// Constrain y properly
IntView yv(y);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<MinusView> ix(home,x.size());
for (int i=0; i<x.size(); i++) {
ix[i].idx=i; ix[i].view=MinusView(x[i]);
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<MinusView,IntView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<MinusView,IntView,false>
::post(home,ix,yv)));
}
void
argmin(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
Limits::nonnegative(o,"Int::argmin");
if (x.size() == 0)
throw TooFewArguments("Int::argmin");
if (same(x,y))
throw ArgumentSame("Int::argmin");
GECODE_POST;
// Constrain y properly
OffsetView yv(y,-o);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<MinusView> ix(home,x.size());
for (int i=0; i<x.size(); i++) {
ix[i].idx=i; ix[i].view=MinusView(x[i]);
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<MinusView,OffsetView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<MinusView,OffsetView,false>
::post(home,ix,yv)));
}
void
argmax(Home home, const BoolVarArgs& x, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
if (x.size() == 0)
throw TooFewArguments("Int::argmax");
GECODE_POST;
// Constrain y properly
IntView yv(y);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<BoolView> ix(home,x.size());
for (int i=x.size(); i--; ) {
ix[i].idx=i; ix[i].view=x[i];
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<BoolView,IntView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<BoolView,IntView,false>
::post(home,ix,yv)));
}
void
argmax(Home home, const BoolVarArgs& x, int o, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
Limits::nonnegative(o,"Int::argmax");
if (x.size() == 0)
throw TooFewArguments("Int::argmax");
GECODE_POST;
// Constrain y properly
OffsetView yv(y,-o);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<BoolView> ix(home,x.size());
for (int i=x.size(); i--; ) {
ix[i].idx=i; ix[i].view=x[i];
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<BoolView,OffsetView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<BoolView,OffsetView,false>
::post(home,ix,yv)));
}
void
argmin(Home home, const BoolVarArgs& x, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
if (x.size() == 0)
throw TooFewArguments("Int::argmin");
GECODE_POST;
// Constrain y properly
IntView yv(y);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<NegBoolView> ix(home,x.size());
for (int i=x.size(); i--; ) {
ix[i].idx=i; ix[i].view=NegBoolView(x[i]);
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<NegBoolView,IntView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<NegBoolView,IntView,false>
::post(home,ix,yv)));
}
void
argmin(Home home, const BoolVarArgs& x, int o, IntVar y, bool tiebreak,
IntPropLevel) {
using namespace Int;
Limits::nonnegative(o,"Int::argmin");
if (x.size() == 0)
throw TooFewArguments("Int::argmin");
GECODE_POST;
// Constrain y properly
OffsetView yv(y,-o);
GECODE_ME_FAIL(yv.gq(home,0));
GECODE_ME_FAIL(yv.le(home,x.size()));
// Construct index view array
IdxViewArray<NegBoolView> ix(home,x.size());
for (int i=x.size(); i--; ) {
ix[i].idx=i; ix[i].view=NegBoolView(x[i]);
}
if (tiebreak)
GECODE_ES_FAIL((Arithmetic::ArgMax<NegBoolView,OffsetView,true>
::post(home,ix,yv)));
else
GECODE_ES_FAIL((Arithmetic::ArgMax<NegBoolView,OffsetView,false>
::post(home,ix,yv)));
}
void
mult(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::MultDom::post(home,x0,x1,x2));
} else {
GECODE_ES_FAIL(Arithmetic::MultBnd::post(home,x0,x1,x2));
}
}
void
divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
IntPropLevel) {
using namespace Int;
GECODE_POST;
IntVar prod(home, Int::Limits::min, Int::Limits::max);
GECODE_ES_FAIL(Arithmetic::MultBnd::post(home,x1,x2,prod));
Linear::Term<IntView> t[3];
t[0].a = 1; t[0].x = prod;
t[1].a = 1; t[1].x = x3;
int min, max;
Linear::estimate(t,2,0,min,max);
IntView x0v(x0);
GECODE_ME_FAIL(x0v.gq(home,min));
GECODE_ME_FAIL(x0v.lq(home,max));
t[2].a=-1; t[2].x=x0;
Linear::post(home,t,3,IRT_EQ,0,IPL_BND);
if (home.failed()) return;
IntView x1v(x1);
GECODE_ES_FAIL(
Arithmetic::DivMod<IntView>::post(home,x0,x1,x3));
}
void
div(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel) {
using namespace Int;
GECODE_POST;
GECODE_ES_FAIL(
(Arithmetic::DivBnd<IntView>::post(home,x0,x1,x2)));
}
void
mod(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
IntVar _div(home, Int::Limits::min, Int::Limits::max);
divmod(home, x0, x1, _div, x2, ipl);
}
void
sqr(Home home, IntVar x0, IntVar x1, IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
Arithmetic::SqrOps ops;
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::PowDom<Arithmetic::SqrOps>
::post(home,x0,x1,ops));
} else {
GECODE_ES_FAIL(Arithmetic::PowBnd<Arithmetic::SqrOps>
::post(home,x0,x1,ops));
}
}
void
sqrt(Home home, IntVar x0, IntVar x1, IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
Arithmetic::SqrOps ops;
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::NrootDom<Arithmetic::SqrOps>
::post(home,x0,x1,ops));
} else {
GECODE_ES_FAIL(Arithmetic::NrootBnd<Arithmetic::SqrOps>
::post(home,x0,x1,ops));
}
}
void
pow(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl) {
using namespace Int;
Limits::nonnegative(n,"Int::pow");
GECODE_POST;
if (n == 2) {
sqr(home, x0, x1, ipl);
return;
}
Arithmetic::PowOps ops(n);
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::PowDom<Arithmetic::PowOps>
::post(home,x0,x1,ops));
} else {
GECODE_ES_FAIL(Arithmetic::PowBnd<Arithmetic::PowOps>
::post(home,x0,x1,ops));
}
}
void
nroot(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl) {
using namespace Int;
Limits::positive(n,"Int::nroot");
GECODE_POST;
if (n == 2) {
sqrt(home, x0, x1, ipl);
return;
}
Arithmetic::PowOps ops(n);
if (vbd(ipl) == IPL_DOM) {
GECODE_ES_FAIL(Arithmetic::NrootDom<Arithmetic::PowOps>
::post(home,x0,x1,ops));
} else {
GECODE_ES_FAIL(Arithmetic::NrootBnd<Arithmetic::PowOps>
::post(home,x0,x1,ops));
}
}
}
// STATISTICS: int-post
Gecode::ArgArrayBase::size
int size(void) const
Return size of array (number of elements).
Definition array.hpp:1607
Gecode::BoolVarArgs
Passing Boolean variables.
Definition int.hh:712
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Home::failed
bool failed(void) const
Check whether corresponding space is failed.
Definition core.hpp:4048
Gecode::IntVarArgs
Passing integer variables.
Definition int.hh:656
Gecode::IntVar
Integer variables.
Definition int.hh:371
Gecode::Int::ArgumentSame
Exception: Arguments contain same variable multiply
Definition exception.hpp:80
Gecode::Int::Arithmetic::AbsBnd::post
static ExecStatus post(Home home, View x0, View x1)
Post bounds consistent propagator .
Definition abs.hpp:93
Gecode::Int::Arithmetic::AbsDom::post
static ExecStatus post(Home home, View x0, View x1)
Post domain consistent propagator .
Definition abs.hpp:148
Gecode::Int::Arithmetic::ArgMax
Argument maximum propagator.
Definition arithmetic.hh:260
Gecode::Int::Arithmetic::DivBnd::post
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator (rounding towards 0).
Definition divmod.hpp:235
Gecode::Int::Arithmetic::DivMod::post
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition divmod.hpp:280
Gecode::Int::Arithmetic::MaxBnd::post
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition max.hpp:80
Gecode::Int::Arithmetic::MaxDom::post
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition max.hpp:242
Gecode::Int::Arithmetic::MultBnd::post
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
Definition mult.cpp:144
Gecode::Int::Arithmetic::MultDom::post
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
Definition mult.cpp:311
Gecode::Int::Arithmetic::NaryMaxBnd::post
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Definition max.hpp:134
Gecode::Int::Arithmetic::NaryMaxDom::post
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Definition max.hpp:318
Gecode::Int::Arithmetic::NrootBnd
Bounds consistent n-th root propagator.
Definition arithmetic.hh:520
Gecode::Int::Arithmetic::NrootDom
Domain consistent n-th root propagator.
Definition arithmetic.hh:580
Gecode::Int::Arithmetic::PowBnd
Bounds consistent power propagator.
Definition arithmetic.hh:395
Gecode::Int::Arithmetic::PowDom
Domain consistent power propagator.
Definition arithmetic.hh:454
Gecode::Int::Arithmetic::PowOps
Operations for power and nroot propagators.
Definition arithmetic.hh:327
Gecode::Int::Arithmetic::SqrOps
Operations for square and square-root propagators.
Definition arithmetic.hh:302
Gecode::Int::IdxViewArray
An array of IdxView pairs.
Definition idx-view.hh:67
Gecode::Int::IntView
Integer view for integer variables.
Definition view.hpp:129
Gecode::Int::IntView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition int.hpp:121
Gecode::Int::IntView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition int.hpp:130
Gecode::Int::IntView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition int.hpp:139
Gecode::Int::Linear::Term
Class for describing linear term .
Definition linear.hh:1336
Gecode::Int::Linear::Term::x
View x
View.
Definition linear.hh:1341
Gecode::Int::Linear::Term::a
int a
Coefficient.
Definition linear.hh:1339
Gecode::Int::MinusView
Minus integer view.
Definition view.hpp:282
Gecode::Int::NegBoolView
Negated Boolean view.
Definition view.hpp:1574
Gecode::Int::OffsetView
Offset integer view.
Definition view.hpp:443
Gecode::Int::OffsetView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition offset.hpp:145
Gecode::Int::OffsetView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition offset.hpp:136
Gecode::Int::TooFewArguments
Exception: Too few arguments available in argument array
Definition exception.hpp:66
Gecode::ViewArray
View arrays.
Definition array.hpp:253
Gecode::Int::Linear::post
void post(Home home, Term< IntView > *t, int n, IntRelType irt, int c, IntPropLevel=IPL_DEF)
Post propagator for linear constraint over integers.
Definition int-post.cpp:219
GECODE_POST
#define GECODE_POST
Check for failure in a constraint post function.
Definition macros.hpp:40
GECODE_ES_FAIL
#define GECODE_ES_FAIL(es)
Check whether execution status es is failed, and fail space home.
Definition macros.hpp:103
GECODE_ME_FAIL
#define GECODE_ME_FAIL(me)
Check whether modification event me is failed, and fail space home.
Definition macros.hpp:77
Gecode::IntPropLevel
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:974
Gecode::IRT_EQ
@ IRT_EQ
Equality ( ).
Definition int.hh:926
Gecode::IPL_DOM
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
Definition int.hh:979
Gecode::IPL_BND
@ IPL_BND
Bounds propagation.
Definition int.hh:978
arithmetic.hh
Gecode::Int::Limits::positive
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l.
Definition limits.hpp:57
Gecode::Int::Limits::nonnegative
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l.
Definition limits.hpp:68
Gecode::Int::Limits::min
const int min
Smallest allowed integer value.
Definition int.hh:118
Gecode::Int::Limits::max
const int max
Largest allowed integer value.
Definition int.hh:116
Gecode::Int::Linear::estimate
void estimate(Term< View > *t, int n, int c, int &l, int &u)
Estimate lower and upper bounds.
Definition post.hpp:41
Gecode::Int
Finite domain integers.
Gecode
Gecode toplevel namespace
Gecode::mod
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:360
Gecode::sqr
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:95
Gecode::tiebreak
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
Definition tiebreak.hpp:80
Gecode::min
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:67
Gecode::vbd
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Definition ipl.hpp:37
Gecode::abs
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:41
Gecode::div
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:127
Gecode::argmax
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:110
Gecode::mult
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:88
Gecode::divmod
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:327
Gecode::sqrt
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:102
Gecode::same
bool same(VarArgArray< Var > x, VarArgArray< Var > y)
Definition array.hpp:1937
Gecode::post
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
Definition filter.cpp:138
Gecode::max
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:49
Gecode::argmin
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:163
Gecode::pow
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Definition arithmetic.cpp:109
Gecode::nroot
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Definition arithmetic.cpp:118