float.hh
Go to the documentation of this file.
void init(Home home, const FloatVarArgs &x, double d=1.0, bool share=true)
Initialize for float variables x with decay factor d.
Definition afc.hpp:54
void init(Home home, const FloatVarArgs &x, double d=1.0, bool p=true, bool f=true, FloatBranchMerit bm=nullptr)
Initialize for float variables x with decay factor d.
Definition action.cpp:45
void init(Home home, const FloatVarArgs &x, FloatBranchMerit bm=nullptr)
Initialize for float variables x.
Definition chb.cpp:44
FloatTraceDelta(Float::FloatTraceView o, Float::FloatView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
Definition delta.hpp:37
FloatValArgs(std::initializer_list< FloatVal > x)
Allocate array and copy elements from x.
static FloatValArgs create(int n, FloatVal start, int inc=1)
Allocate array with n elements such that for all .
Definition array.cpp:41
@ SEL_SPLIT_RND
Select values randomly which are not greater or not smaller than mean of largest and smallest value.
Definition float.hh:1834
@ SEL_SPLIT_MIN
Select values not greater than mean of smallest and largest value.
Definition float.hh:1832
@ SEL_SPLIT_MAX
Select values greater than mean of smallest and largest value.
Definition float.hh:1833
friend std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatVal &x)
Definition val.hpp:361
friend FloatVal Float::hull(const FloatVal &x, const FloatVal &y)
friend bool operator==(const FloatVal &x, const FloatVal &y)
Definition val.hpp:295
boost::numeric::interval_lib::checking_strict< FloatNum > P
Used checking policy.
Definition float.hh:413
friend bool operator<(const FloatVal &x, const FloatVal &y)
Definition val.hpp:227
friend bool operator<=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:244
boost::numeric::interval< FloatNum, boost::numeric::interval_lib::policies< R, P > > FloatValImpType
Implementation type for float value.
Definition float.hh:418
friend FloatVal operator*(const FloatVal &x, const FloatVal &y)
Definition val.hpp:201
friend FloatVal operator/(const FloatVal &x, const FloatVal &y)
Definition val.hpp:214
void assign(FloatNum const &l, FloatNum const &u)
Assign lower bound l and upper bound u.
Definition val.hpp:65
friend bool operator>=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:278
friend bool operator!=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:318
friend bool operator>(const FloatVal &x, const FloatVal &y)
Definition val.hpp:261
FloatNum size(void) const
Return size of float value (distance between maximum and minimum).
Definition val.hpp:78
friend FloatVal fmod(const FloatVal &x, const FloatVal &y)
Definition val.hpp:423
FloatVarArgs & operator=(const FloatVarArgs &)=default
Assignment operator.
FloatVarArray & operator=(const FloatVarArray &)=default
Assignment operator.
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
Definition float.hh:1700
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
Definition float.hh:1701
FloatNum size(void) const
Return size of domain (distance between maximum and minimum).
Definition float.hpp:77
Floating point rounding operations without state saving.
Definition float.hh:146
FloatNum int_up(FloatNum x)
Return next upward-rounded integer of x (domain: ).
FloatNum log_down(FloatNum x)
Return lower bound of logarithm of x (domain: ).
FloatNum int_down(FloatNum x)
Return next downward-rounded integer of x (domain: ).
FloatNum exp_down(FloatNum x)
Return lower bound of exponential of x (domain: ).
FloatNum asin_up(FloatNum x)
Return upper bound of arcsine of x (domain: ).
FloatNum log_up(FloatNum x)
Return upper bound of logarithm of x (domain: ).
FloatNum sqrt_down(FloatNum x)
Return lower bound of square root of x (domain: ).
FloatNum sub_down(FloatNum x, FloatNum y)
Return lower bound of x minus y (domain: ).
FloatNum atanh_up(FloatNum x)
Return upper bound of hyperbolic arctangent of x (domain: ).
FloatNum asinh_down(FloatNum x)
Return lower bound of hyperbolic arcsine of x (domain: ).
FloatNum asinh_up(FloatNum x)
Return upper bound of hyperbolic arcsine of x (domain: ).
FloatNum div_up(FloatNum x, FloatNum y)
Return upper bound of x divided y (domain: ).
FloatNum sub_up(FloatNum x, FloatNum y)
Return upper bound of x minus y (domain: ).
FloatNum cosh_down(FloatNum x)
Return lower bound of hyperbolic cosine of x (domain: ).
FloatNum sqrt_up(FloatNum x)
Return upper bound of square root of x (domain: ).
FloatNum mul_down(FloatNum x, FloatNum y)
Return lower bound of x times y (domain: ).
FloatNum tanh_up(FloatNum x)
Return upper bound of hyperbolic tangent of x (domain: ).
FloatNum acosh_down(FloatNum x)
Return lower bound of hyperbolic arccosine of x (domain: ).
FloatNum acosh_up(FloatNum x)
Return upper bound of hyperbolic arccosine of x (domain: ).
FloatNum atan_down(FloatNum x)
Return lower bound of arctangent of x (domain: ).
FloatNum acos_up(FloatNum x)
Return upper bound of arccossine of x (domain: ).
FloatNum sin_up(FloatNum x)
Return upper bound of sine of x (domain: ).
FloatNum tan_up(FloatNum x)
Return upper bound of tangent of x (domain: ).
FloatNum cos_down(FloatNum x)
Return lower bound of cosine of x (domain: ).
FloatNum cos_up(FloatNum x)
Return upper bound of cosine of x (domain: ).
FloatNum tan_down(FloatNum x)
Return lower bound of tangent of x (domain: ).
FloatNum tanh_down(FloatNum x)
Return lower bound of hyperbolic tangent of x (domain: ).
FloatNum atan_up(FloatNum x)
Return upper bound of arctangent of x (domain: ).
FloatNum median(FloatNum x, FloatNum y)
Return an overflow-safe median of x and y, where x <= y.
Definition rounding.hpp:37
FloatNum add_up(FloatNum x, FloatNum y)
Return upper bound of x plus y (domain: ).
FloatNum asin_down(FloatNum x)
Return lower bound of arcsine of x (domain: ).
FloatNum add_down(FloatNum x, FloatNum y)
Return lower bound of x plus y (domain: ).
FloatNum div_down(FloatNum x, FloatNum y)
Return lower bound of x divided by y (domain: ).
FloatNum mul_up(FloatNum x, FloatNum y)
Return upper bound of x times y (domain: ).
FloatNum exp_up(FloatNum x)
Return upper bound of exponential of x (domain: ).
FloatNum sinh_down(FloatNum x)
Return lower bound of hyperbolic sine of x (domain: ).
FloatNum sin_down(FloatNum x)
Return lower bound of sine of x (domain: ).
FloatNum atanh_down(FloatNum x)
Return lower bound of hyperbolic arctangent of x (domain: ).
FloatNum cosh_up(FloatNum x)
Return upper bound of hyperbolic cosine of x (domain: ).
FloatNum sinh_up(FloatNum x)
Return upper bound of hyperbolic sine of x (domain: ).
FloatNum acos_down(FloatNum x)
Return lower bound of arccosine of x (domain: ).
Floating point rounding policy that restores the caller's mode.
Definition float.hh:269
StdFloatTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0.
Definition tracer.cpp:39
virtual void fail(const Space &home, const FloatTraceRecorder &t)
Print failure information.
Definition tracer.cpp:81
virtual void fix(const Space &home, const FloatTraceRecorder &t)
Print fixpoint information.
Definition tracer.cpp:63
virtual void done(const Space &home, const FloatTraceRecorder &t)
Print that trace recorder is done.
Definition tracer.cpp:99
virtual void prune(const Space &home, const FloatTraceRecorder &t, const ViewTraceInfo &vti, int i, FloatTraceDelta &d)
Print prune information.
Definition tracer.cpp:52
virtual void init(const Space &home, const FloatTraceRecorder &t)
Print init information.
Definition tracer.cpp:43
ViewTraceRecorder< Float::FloatView > FloatTraceRecorder
Trace recorder for float variables.
Definition float.hh:2096
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te=(TE_INIT|TE_PRUNE|TE_FIX|TE_FAIL|TE_DONE), FloatTracer &t=StdFloatTracer::def)
Create a tracer for float variables.
Definition trace.cpp:39
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
Definition var.hpp:48
std::function< FloatNumBranch(const Space &home, FloatVar x, int i)> FloatBranchVal
Branch value function type for float variables.
Definition float.hh:1483
std::function< double(const Space &home, FloatVar x, int i)> FloatBranchMerit
Branch merit function type for float variables.
Definition float.hh:1457
std::function< bool(const Space &home, FloatVar x, int i)> FloatBranchFilter
Branch filter function type for float variables.
Definition float.hh:1444
void assign(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatAssign vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Assign all x with variable selection vars and value selection vals.
Definition branch.cpp:111
std::function< void(Space &home, unsigned int a, FloatVar x, int i, FloatNumBranch nl)> FloatBranchCommit
Branch commit function type for float variables.
Definition float.hh:1498
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
Definition branch.cpp:39
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
Definition linear.cpp:41
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Definition rel.cpp:68
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
Definition bool.cpp:39
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.
Definition limits.hpp:44
bool proper_subset(const FloatVal &x, const FloatVal &y)
Definition val.hpp:495
boost::numeric::interval_lib::rounded_arith_opp< FloatNum > RoundingControl
Rounding operations that keep upward mode between calls.
Definition float.hh:139
FloatVal intersect(const FloatVal &x, const FloatVal &y)
Definition val.hpp:504
Gecode toplevel namespace
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree divided by domain size.
Definition var.hpp:222
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree divided by domain size.
Definition var.hpp:217
FloatVarBranch FLOAT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
Definition var.hpp:112
FloatValBranch FLOAT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
Definition val.hpp:60
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.
Definition float.hh:1665
FloatVarBranch FLOAT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count with decay factor d.
Definition var.hpp:127
FloatVarBranch FLOAT_VAR_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest domain size.
Definition var.hpp:212
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition channel.cpp:41
FloatVarBranch FLOAT_VAR_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest max.
Definition var.hpp:202
FloatValBranch FLOAT_VAL_SPLIT_RND(Rnd r)
Select values randomly which are not greater or not smaller than mean of largest and smallest value.
Definition val.hpp:65
FloatVarBranch FLOAT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smalllest accumulated failure count divided by domain size with decay factor d.
Definition var.hpp:227
FloatVarBranch FLOAT_VAR_CHB_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score divided by domain size.
Definition var.hpp:277
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:67
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:127
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:88
FloatVarBranch FLOAT_VAR_CHB_MIN(BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
Definition var.hpp:167
FloatVarBranch FLOAT_VAR_CHB_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest CHB Q-score divided by domain size.
Definition var.hpp:267
FloatVarBranch FLOAT_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with highest action with decay factor d.
Definition var.hpp:157
FloatVarBranch FLOAT_VAR_CHB_MAX(BranchTbl tbl=nullptr)
Select variable with highest CHB Q-score.
Definition var.hpp:177
FloatVarBranch FLOAT_VAR_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest min.
Definition var.hpp:187
FloatValBranch FLOAT_VAL(FloatBranchVal v, FloatBranchCommit c=nullptr)
Definition val.hpp:70
FloatVarBranch FLOAT_VAR_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest max.
Definition var.hpp:197
FloatVarBranch FLOAT_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with lowest action with decay factor d.
Definition var.hpp:147
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
Definition relax.cpp:57
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
Definition exec.cpp:39
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:49
FloatVarBranch FLOAT_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
Definition var.hpp:122
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest action divided by domain size with decay factor d.
Definition var.hpp:257
FloatVarBranch FLOAT_VAR_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest min.
Definition var.hpp:192
FloatAssign FLOAT_ASSIGN_RND(Rnd r)
Select median value of a randomly chosen part.
Definition assign.hpp:65
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
Definition arithmetic.cpp:109
FloatVarBranch FLOAT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
Definition var.hpp:237
FloatVarBranch FLOAT_VAR_MERIT_MIN(FloatBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with least merit according to branch merit function bm.
Definition var.hpp:102
FloatVarBranch FLOAT_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
Definition var.hpp:117
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
Definition arithmetic.cpp:118
FloatValBranch FLOAT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
Definition val.hpp:55
FloatVarBranch FLOAT_VAR_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest domain size.
Definition var.hpp:207
FloatVarBranch FLOAT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count with decay factor d.
Definition var.hpp:137
FloatAssign FLOAT_ASSIGN(FloatBranchVal v, FloatBranchCommit c=nullptr)
Definition assign.hpp:70
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest action divided by domain size with decay factor d.
Definition var.hpp:247
FloatVarBranch FLOAT_VAR_MERIT_MAX(FloatBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with highest merit according to branch merit function bm.
Definition var.hpp:107
