Go to the documentation of this file.
42 #ifndef __GECODE_FLOAT_HH__
43 #define __GECODE_FLOAT_HH__
58 #if !defined(GECODE_STATIC_LIBS) && \
59 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
61 #ifdef GECODE_BUILD_FLOAT
62 #define GECODE_FLOAT_EXPORT __declspec( dllexport )
64 #define GECODE_FLOAT_EXPORT __declspec( dllimport )
69 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
70 #define GECODE_FLOAT_EXPORT __attribute__ ((visibility("default")))
72 #define GECODE_FLOAT_EXPORT
78 #ifndef GECODE_BUILD_FLOAT
79 #define GECODE_LIBRARY_NAME "Float"
84 #include <gecode/third-party/boost/numeric/interval.hpp>
132 namespace Gecode {
namespace Float {
135 #if defined(_MSC_VER) && (defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP > 0)))
142 typedef gecode_boost::numeric::interval_lib::rounded_arith_std<FloatNum>
148 typedef gecode_boost::numeric::interval_lib::rounded_arith_opp<FloatNum>
202 #ifdef GECODE_HAS_MPFR
285 namespace Gecode {
namespace Float {
291 bool subset(
const FloatVal&
x,
const FloatVal&
y);
301 bool overlap(
const FloatVal&
x,
const FloatVal&
y);
307 FloatVal
intersect(
const FloatVal&
x,
const FloatVal&
y);
312 FloatVal
hull(
const FloatVal&
x,
const FloatVal&
y);
373 template<
class Char,
class Traits>
374 friend std::basic_ostream<Char,Traits>&
390 #ifdef GECODE_HAS_MPFR
420 typedef gecode_boost::numeric::interval_lib::save_state<Float::Rounding>
R;
422 typedef gecode_boost::numeric::interval_lib::checking_strict<FloatNum>
P;
424 typedef gecode_boost::numeric::interval
426 gecode_boost::numeric::interval_lib::policies<R, P> >
467 bool tight(
void)
const;
681 template<
class Char,
class Traits>
682 std::basic_ostream<Char,Traits>&
742 #ifdef GECODE_HAS_MPFR
839 namespace Gecode {
namespace Float {
943 template<
class Char,
class Traits>
944 std::basic_ostream<Char,Traits>&
967 template<
class InputIterator>
996 template<
class InputIterator>
1087 dom(Home home, FloatVar
x, FloatVal
n);
1090 dom(Home home,
const FloatVarArgs&
x, FloatVal
n);
1099 dom(Home home, FloatVar
x, FloatVal
n, Reify
r);
1105 dom(Home home, FloatVar
x, FloatVar
d);
1108 dom(Home home,
const FloatVarArgs&
x,
const FloatVarArgs&
d);
1153 ite(Home home, BoolVar
b, FloatVar
x, FloatVar
y, FloatVar
z);
1169 min(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1174 min(Home home,
const FloatVarArgs&
x, FloatVar
y);
1178 max(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1183 max(Home home,
const FloatVarArgs&
x, FloatVar
y);
1188 abs(Home home, FloatVar x0, FloatVar x1);
1193 mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1198 sqr(Home home, FloatVar x0, FloatVar x1);
1203 sqrt(Home home, FloatVar x0, FloatVar x1);
1208 pow(Home home, FloatVar x0,
int n, FloatVar x1);
1213 nroot(Home home, FloatVar x0,
int n, FloatVar x1);
1218 div(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1219 #ifdef GECODE_HAS_MPFR
1223 exp(Home home, FloatVar x0, FloatVar x1);
1227 log(Home home, FloatVar x0, FloatVar x1);
1239 asin(Home home, FloatVar x0, FloatVar x1);
1243 sin(Home home, FloatVar x0, FloatVar x1);
1247 acos(Home home, FloatVar x0, FloatVar x1);
1251 cos(Home home, FloatVar x0, FloatVar x1);
1255 atan(Home home, FloatVar x0, FloatVar x1);
1259 tan(Home home, FloatVar x0, FloatVar x1);
1271 linear(Home home,
const FloatVarArgs&
x,
1277 linear(Home home,
const FloatVarArgs&
x,
1283 linear(Home home,
const FloatVarArgs&
x,
1289 linear(Home home,
const FloatVarArgs&
x,
1298 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1307 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1316 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1325 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1336 channel(Home home, FloatVar x0, IntVar x1);
1339 channel(Home home, IntVar x0, FloatVar x1);
1342 channel(Home home, FloatVar x0, BoolVar x1);
1345 channel(Home home, BoolVar x0, FloatVar x1);
1364 wait(Home home, FloatVar
x, std::function<
void(Space& home)>
c);
1367 wait(Home home,
const FloatVarArgs&
x, std::function<
void(Space& home)>
c);
1387 typedef std::function<bool(
const Space& home, FloatVar
x,
int i)>
1440 typedef std::function<void(
Space& home,
unsigned int a,
1590 typedef std::function<void(
const Space &home,
const Brancher&
b,
1592 FloatVar
x,
int i,
const FloatNumBranch&
n,
1865 branch(Home home,
const FloatVarArgs&
x,
1866 FloatVarBranch vars, FloatValBranch vals,
1875 branch(Home home,
const FloatVarArgs&
x,
1876 TieBreak<FloatVarBranch> vars, FloatValBranch vals,
1885 branch(Home home, FloatVar
x, FloatValBranch vals,
1894 assign(Home home,
const FloatVarArgs&
x, FloatAssign vals,
1903 assign(Home home, FloatVar
x, FloatAssign vals,
1933 relax(Home home,
const FloatVarArgs&
x,
const FloatVarArgs& sx,
Select s
Which value to select.
FloatNum tanh_down(FloatNum x)
Return lower bound of hyperbolic tangent of x (domain: )
FloatNum mul_up(FloatNum x, FloatNum y)
Return upper bound of x times y (domain: )
FloatNum pi_twice_lower(void)
Return lower bound of .
Class for action management.
@ TE_PRUNE
Trace prune events.
bool l
Whether to try the lower or upper half first.
FloatNum int_down(FloatNum x)
Return next downward-rounded integer of x (domain: )
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Post propagator for SetVar x
FloatAFC(void)
Construct as not yet initialized.
@ SEL_RND
Select median value of a randomly chosen part.
@ SEL_ACTION_SIZE_MIN
With smallest action divided by domain size.
FloatNum sin_down(FloatNum x)
Return lower bound of sine of x (domain: )
FloatVal & operator-=(const FloatNum &n)
Subtract by n.
Post propagator for SetVar SetOpType SetVar y
friend FloatVal atan(const FloatVal &x)
void assign(Home home, const FloatVarArgs &x, FloatAssign fa, FloatBranchFilter bf, FloatVarValPrint vvp)
Assign all x with value selection vals.
FloatAssign FLOAT_ASSIGN_MAX(void)
Select median value of the upper part.
void expand(Home home, const FloatVarArgs &x)
Expand AFC, action, and CHB.
FloatNum atanh_up(FloatNum x)
Return upper bound of hyperbolic arctangent of x (domain: )
bool zero_in(void) const
Test whether zero is included.
friend FloatVal fmod(const FloatVal &x, const FloatVal &y)
@ SEL_DEGREE_MAX
With largest degree.
gecode_boost::numeric::interval< FloatNum, gecode_boost::numeric::interval_lib::policies< R, P > > FloatValImpType
Implementation type for float value.
name Constructor Initialize with old trace view a o
friend FloatVal operator-(const FloatVal &x)
std::function< void(const Space &home, const Brancher &b, unsigned int a, FloatVar x, int i, const FloatNumBranch &n, std::ostream &o)> FloatVarValPrint
Function type for explaining branching alternatives for float variables.
FloatVarBranch FLOAT_VAR_AFC_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smalllest accumulated failure count divided by domain size with decay factor d.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool operator<(const FloatVal &x, const FloatVal &y)
FloatNum atan_up(FloatNum x)
Return upper bound of arctangent of x (domain: )
static FloatVal pi_twice(void)
Return .
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Select
Which variable selection.
@ SEL_AFC_MAX
With largest accumulated failure count.
FloatNum int_up(FloatNum x)
Return next upward-rounded integer of x (domain: )
FloatCHB & operator=(const FloatCHB &chb)
Assignment operator.
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl)
Select variable with smallest degree divided by domain size.
FloatVal val(void) const
Return assigned value.
FloatNum mul_down(FloatNum x, FloatNum y)
Return lower bound of x times y (domain: )
FloatVarBranch FLOAT_VAR_CHB_SIZE_MAX(BranchTbl tbl)
Select variable with largest CHB Q-score divided by domain size.
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatNum add_up(FloatNum x, FloatNum y)
Return upper bound of x plus y (domain: )
FloatNum sqrt_up(FloatNum x)
Return upper bound of square root of x (domain: )
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
@ SEL_ACTION_MIN
With lowest action.
FloatVarBranch FLOAT_VAR_AFC_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count with decay factor d.
FloatNum cosh_down(FloatNum x)
Return lower bound of hyperbolic cosine of x (domain: )
Recording actions for float variables.
FloatVal tanh(const FloatVal &x)
ViewTraceRecorder< Float::FloatView > FloatTraceRecorder
Trace recorder for float variables.
FloatVal acosh(const FloatVal &x)
Which values to select for branching first.
Class for CHB management.
FloatNum tanh_up(FloatNum x)
Return upper bound of hyperbolic tangent of x (domain: )
FloatVarArgs(const VarArray< FloatVar > &a)
Initialize from variable array a (copy elements)
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
@ SEL_NONE
First unassigned.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
FloatNum exp_up(FloatNum x)
Return upper bound of exponential of x (domain: )
Gecode::IntArgs i(4, 1, 2, 3, 4)
FloatAFC & operator=(const FloatAFC &a)
Assignment operator.
Select
Which value selection.
~Rounding(void)
Destructor (restores previous rounding mode)
FloatNum div_down(FloatNum x, FloatNum y)
Return lower bound of x divided by y (domain: )
Select s
Which value to select.
FloatNum atan_down(FloatNum x)
Return lower bound of arctangent of x (domain: )
Rounding(void)
Default constructor (configures full rounding mode)
Which variable to select for branching.
Delta const information Delta & d
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
FloatVarBranch FLOAT_VAR_NONE(void)
Select first unassigned variable.
FloatNum cos_down(FloatNum x)
Return lower bound of cosine of x (domain: )
const FloatNum min
Smallest allowed float value.
void sin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
bool valid(const FloatVal &n)
Return whether float n is a valid number.
Select select(void) const
Return selection strategy.
@ SEL_CHB_MIN
With lowest CHB Q-score.
FloatValBranch FLOAT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
@ TE_FIX
Trace fixpoint events.
FloatVal & operator*=(const FloatNum &n)
Multiply by n.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
FloatNum sin_up(FloatNum x)
Return upper bound of sine of x (domain: )
friend FloatVal cos(const FloatVal &x)
FloatNum sinh_down(FloatNum x)
Return lower bound of hyperbolic sine of x (domain: )
FloatVarBranch FLOAT_VAR_MIN_MAX(BranchTbl tbl)
Select variable with largest min.
FloatVal operator+(const FloatVal &x)
Standard float variable tracer.
FloatRelType
Relation types for floats.
FloatVarBranch FLOAT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
FloatVarArgs(const std::vector< FloatVar > &a)
Initialize from vector a.
FloatNum asin_down(FloatNum x)
Return lower bound of arcsine of x (domain: )
@ SEL_DEGREE_MIN
With smallest degree.
FloatNum max(void) const
Return maximum of domain.
union Gecode::@579::NNF::@61 u
Union depending on nodetype t.
void init(Home home, const FloatVarArgs &x, double d=1.0)
Initialize for float variables x with decay factor d.
FloatNum tan_up(FloatNum x)
Return upper bound of tangent of x (domain: )
FloatVal & operator/=(const FloatNum &n)
Divide by n.
FloatVal asinh(const FloatVal &x)
bool proper_subset(const FloatVal &x, const FloatVal &y)
void acos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Output stream to use std::ostream & os
FloatNum atanh_down(FloatNum x)
Return lower bound of hyperbolic arctangent of x (domain: )
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
FloatNum acosh_down(FloatNum x)
Return lower bound of hyperbolic arccosine of x (domain: )
Variable branching information.
FloatAssign FLOAT_ASSIGN_RND(Rnd r)
Select median value of a randomly chosen part.
Gecode toplevel namespace
@ SEL_SPLIT_RND
Select values randomly which are not greater or not smaller than mean of largest and smallest value.
@ SEL_SIZE_MIN
With smallest domain size.
bool operator>(const FloatVal &x, const FloatVal &y)
double tbl(const Gecode::Space &, double w, double b)
Test function for tie-break limit function.
friend FloatVal sqr(const FloatVal &x)
FloatVarBranch FLOAT_VAR_MAX_MAX(BranchTbl tbl)
Select variable with largest max.
@ SEL_SIZE_MAX
With largest domain size.
@ TE_DONE
Trace done events.
FloatNum asinh_up(FloatNum x)
Return upper bound of hyperbolic arcsine of x (domain: )
FloatVarArgs(int n)
Allocate array with n elements.
@ SEL_CHB_MAX
With highest CHB Q-score.
Float view for float variables.
friend FloatVal sinh(const FloatVal &x)
@ SEL_CHB_SIZE_MAX
With largest CHB Q-score divided by domain size.
FloatVal operator*(const FloatVal &x, const FloatVal &y)
FloatVal & operator=(const FloatNum &n)
Assignment operator.
int n
Number of variables (size)
Argument array for non-primitive types.
Generic domain change information to be supplied to advisors.
friend FloatVal acos(const FloatVal &x)
Return maximum FloatNum max(void) const
friend FloatVal asin(const FloatVal &x)
friend std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatVal &x)
FloatVarBranch FLOAT_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
FloatAssign FLOAT_ASSIGN_MIN(void)
Select median value of the lower part.
FloatNum acos_up(FloatNum x)
Return upper bound of arccossine of x (domain: )
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
bool in(FloatNum n) const
Test whether n is included.
bool operator>=(const FloatVal &x, const FloatVal &y)
Home class for posting propagators
gecode_boost::numeric::interval_lib::checking_strict< FloatNum > P
Used checking policy.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
FloatValBranch FLOAT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
Select select(void) const
Return selection strategy.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
FloatVal(void)
Default constructor.
friend bool operator<=(const FloatVal &x, const FloatVal &y)
@ SEL_CHB_SIZE_MIN
With smallest CHB Q-score divided by domain size.
@ SEL_SPLIT_MIN
Select values not greater than mean of smallest and largest value.
FloatVal & operator+=(const FloatNum &n)
Increment by n.
FloatNum log_down(FloatNum x)
Return lower bound of logarithm of x (domain: )
static FloatValArgs create(int n, FloatVal start, int inc=1)
Allocate array with n elements such that for all .
static FloatVal hull(FloatNum x, FloatNum y)
Return hull of x and y.
Recording CHB for float variables.
std::function< void(Space &home, unsigned int a, FloatVar x, int i, FloatNumBranch nl)> FloatBranchCommit
Branch commit function type for float variables.
Tracer that process view trace information.
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatVarBranch FLOAT_VAR_CHB_MAX(BranchTbl tbl)
Select variable with highest CHB Q-score.
static FloatVal pi_half(void)
Return .
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Post propagator for SetVar SetOpType SetVar SetRelType r
double FloatNum
Floating point number base type.
friend FloatVal abs(const FloatVal &x)
FloatNum cos_up(FloatNum x)
Return upper bound of cosine of x (domain: )
friend FloatVal operator+(const FloatVal &x)
FloatNum log_up(FloatNum x)
Return upper bound of logarithm of x (domain: )
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatNum add_down(FloatNum x, FloatNum y)
Return lower bound of x plus y (domain: )
FloatNum pi_upper(void)
Return upper bound of .
FloatVarBranch FLOAT_VAR_MAX_MIN(BranchTbl tbl)
Select variable with smallest max.
Value description class for branching.
friend FloatVal acosh(const FloatVal &x)
Value branching information.
FloatNum n
The middle value for branching.
@ TE_INIT
Trace init events.
FloatValImpType x
Implementation of float value.
Floating point rounding policy.
Select s
Which variable to select.
FloatVarBranch FLOAT_VAR_AFC_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count with decay factor d.
FloatVarBranch FLOAT_VAR_MERIT_MAX(FloatBranchMerit bm, BranchTbl tbl)
Select variable with highest merit according to branch merit function bm.
bool subset(const FloatVal &x, const FloatVal &y)
name Constructor Initialize with old trace view a new view a and delta a d FloatTraceDelta(Float::FloatTraceView o, Float::FloatView n, const Delta &d)
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
FloatVarArray(void)
Default constructor (array of size 0)
const double base
Base for geometric restart sequence.
FloatNum min(void) const
Return minimum of domain.
FloatVal operator/(const FloatVal &x, const FloatVal &y)
friend FloatVal pow(const FloatVal &x, int n)
FloatAssign FLOAT_ASSIGN(FloatBranchVal v, FloatBranchCommit c)
FloatVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
FloatVal sinh(const FloatVal &x)
#define GECODE_FLOAT_EXPORT
FloatNum sub_down(FloatNum x, FloatNum y)
Return lower bound of x minus y (domain: )
FloatVal atanh(const FloatVal &x)
@ SEL_MERIT_MIN
With least merit.
Propagator for recording view trace information.
@ SEL_MIN_MIN
With smallest min.
FloatNum size(void) const
Return size of domain (distance between maximum and minimum)
FloatVarBranch FLOAT_VAR_CHB_SIZE_MIN(BranchTbl tbl)
Select variable with smallest CHB Q-score divided by domain size.
ViewTracer< Float::FloatView > FloatTracer
Tracer for float variables.
@ FRT_LQ
Less or equal ( )
Select select(void) const
Return selection strategy.
@ SEL_MIN
Select median value of the lower part.
FloatVarArgs(void)
Allocate empty array.
friend FloatVal operator/(const FloatVal &x, const FloatVal &y)
@ SEL_DEGREE_SIZE_MAX
With largest degree divided by domain size.
FloatVarBranch FLOAT_VAR_MIN_MIN(BranchTbl tbl)
Select variable with smallest min.
FloatNum pi_lower(void)
Return lower bound of .
bool operator!=(const FloatVal &x, const FloatVal &y)
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
friend bool operator==(const FloatVal &x, const FloatVal &y)
FloatAction(void)
Construct as not yet initialized.
FloatVal operator-(const FloatVal &x)
FloatAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
friend FloatVal log(const FloatVal &x)
FloatNum size(void) const
Return size of float value (distance between maximum and minimum)
FloatCHB(void)
Construct as not yet initialized.
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
bool operator<=(const FloatVal &x, const FloatVal &y)
friend FloatVal sin(const FloatVal &x)
FloatNum tan_down(FloatNum x)
Return lower bound of tangent of x (domain: )
bool tight(void) const
Test whether float is tight.
FloatVal domain(void) const
Return domain.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
std::function< bool(const Space &home, FloatVar x, int i)> FloatBranchFilter
Branch filter function type for float variables.
FloatVarBranch FLOAT_VAR_SIZE_MAX(BranchTbl tbl)
Select variable with largest domain size.
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
FloatNum med(void) const
Return median of float value.
@ SEL_SPLIT_MAX
Select values greater than mean of smallest and largest value.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
@ SEL_MAX_MAX
With largest max.
Class for AFC (accumulated failure count) management.
@ SEL_DEGREE_SIZE_MIN
With smallest degree divided by domain size.
FloatNum pi_half_lower(void)
Return lower bound of .
void init(Home home, const FloatVarArgs &x, FloatBranchMerit bm=nullptr)
Initialize for float variables x.
friend FloatVal nroot(const FloatVal &x, int n)
FloatNum sub_up(FloatNum x, FloatNum y)
Return upper bound of x minus y (domain: )
bool overlap(const FloatVal &x, const FloatVal &y)
void init(Home home, const FloatVarArgs &x, double d=1.0, FloatBranchMerit bm=nullptr)
Initialize for float variables x with decay factor d.
FloatNum med(void) const
Return median of domain.
friend FloatVal operator*(const FloatVal &x, const FloatVal &y)
@ FRT_GQ
Greater or equal ( )
Which values to select for assignment.
Variables as interfaces to variable implementations.
FloatNum exp_down(FloatNum x)
Return lower bound of exponential of x (domain: )
FloatVarBranch FLOAT_VAR_MERIT_MIN(FloatBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
FloatNum pi_half_upper(void)
Return upper bound of .
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
name Access Return minimum FloatNum min(void) const
FloatNum acosh_up(FloatNum x)
Return upper bound of hyperbolic arccosine of x (domain: )
FloatNum sqrt_down(FloatNum x)
Return lower bound of square root of x (domain: )
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl)
Select variable with largest degree divided by domain size.
FloatNum sinh_up(FloatNum x)
Return upper bound of hyperbolic sine of x (domain: )
static FloatVal pi(void)
Return lower bound of .
New view Float::FloatView n
friend FloatVal atanh(const FloatVal &x)
friend FloatVal tanh(const FloatVal &x)
bool in(const FloatVal &n) const
Test whether n is contained in domain.
FloatVarBranch FLOAT_VAR_CHB_MIN(BranchTbl tbl)
Select variable with lowest CHB Q-score.
std::function< FloatNumBranch(const Space &home, FloatVar x, int i)> FloatBranchVal
Branch value function type for float variables.
void check(const FloatVal &n, const char *l)
Check whether float n is a valid number, otherwise throw out of limits exception with information l.
FloatVarBranch FLOAT_VAR_ACTION_MIN(double d, BranchTbl tbl)
Select variable with lowest action with decay factor d.
FloatVarBranch FLOAT_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
FloatValBranch FLOAT_VAL_SPLIT_RND(Rnd r)
Select values randomly which are not greater or not smaller than mean of largest and smallest value.
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te, FloatTracer &t)
Create a tracer for float variables.
friend FloatVal asinh(const FloatVal &x)
void asin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
@ SEL_AFC_MIN
With smallest accumulated failure count.
friend bool operator>=(const FloatVal &x, const FloatVal &y)
Select
Which value selection.
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
Rnd r
Random number generator.
FloatNum median(FloatNum x, FloatNum y)
Return median of x and y (domain: )
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
@ SEL_MIN_MAX
With largest min.
FloatVarArgs(const FloatVarArgs &a)
Initialize from variable argument array a (copy elements)
FloatVal cosh(const FloatVal &x)
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
FloatVal hull(const FloatVal &x, const FloatVal &y)
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatVarBranch(void)
Initialize with strategy SEL_NONE.
friend FloatVal tan(const FloatVal &x)
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smallest action divided by domain size with decay factor d.
Gecode::FloatVal c(-8, 8)
gecode_boost::numeric::interval_lib::rounded_arith_opp< FloatNum > RoundingBase
Rounding Base class (optimized version)
@ SEL_MERIT_MAX
With highest merit.
FloatNum min(void) const
Return lower bound.
Shared array with arbitrary number of elements.
FloatNum max(void) const
Return upper bound.
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
@ SEL_MAX
Select median value of the upper part.
int n
Number of negative literals for node type.
friend bool operator>(const FloatVal &x, const FloatVal &y)
Argument array for variables.
std::function< double(const Space &home, FloatVar x, int i)> FloatBranchMerit
Branch merit function type for float variables.
@ SEL_RND
Random (uniform, for tie breaking)
FloatValBranch FLOAT_VAL(FloatBranchVal v, FloatBranchCommit c)
FloatVarBranch FLOAT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking)
FloatNum cosh_up(FloatNum x)
Return upper bound of hyperbolic cosine of x (domain: )
void cos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatNum div_up(FloatNum x, FloatNum y)
Return upper bound of x divided y (domain: )
int p
Number of positive literals for node type.
FloatNum asinh_down(FloatNum x)
Return lower bound of hyperbolic arcsine of x (domain: )
friend FloatVal cosh(const FloatVal &x)
friend FloatVal exp(const FloatVal &x)
@ TE_FAIL
Trace fail events.
Archive & operator<<(Archive &e, FloatNumBranch nl)
@ SEL_MAX_MIN
With smallest max.
FloatNum acos_down(FloatNum x)
Return lower bound of arccosine of x (domain: )
friend FloatVal sqrt(const FloatVal &x)
@ SEL_ACTION_SIZE_MAX
With largest action divided by domain size.
const FloatNum max
Largest allowed float value.
void assign(FloatNum const &l, FloatNum const &u)
Assign lower bound l and upper bound u.
FloatNum pi_twice_upper(void)
Return upper bound of .
@ SEL_ACTION_MAX
With highest action.
FloatValBranch(Select s=SEL_SPLIT_MIN)
Initialize with selection strategy s.
Trace delta information for float variables.
gecode_boost::numeric::interval_lib::save_state< Float::Rounding > R
Used rounding policies.
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest action divided by domain size with decay factor d.
friend bool operator<(const FloatVal &x, const FloatVal &y)
FloatAction & operator=(const FloatAction &a)
Assignment operator.
FloatVal intersect(const FloatVal &x, const FloatVal &y)
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
friend bool operator!=(const FloatVal &x, const FloatVal &y)
FloatVar(void)
Default constructor.
FloatValArgs(void)
Allocate empty array.
FloatVarBranch FLOAT_VAR_AFC_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
FloatVal fmod(const FloatVal &x, const FloatVal &y)
FloatNum asin_up(FloatNum x)
Return upper bound of arcsine of x (domain: )
bool singleton(void) const
Test whether float is a singleton.
FloatVarBranch FLOAT_VAR_ACTION_MAX(double d, BranchTbl tbl)
Select variable with highest action with decay factor d.
Recording AFC information for float variables.
bool operator==(const FloatVal &x, const FloatVal &y)