float.hh File Reference
(Revision: 15631)
#include <climits>
#include <cfloat>
#include <iostream>
#include <functional>
#include <gecode/kernel.hh>
#include <gecode/int.hh>
#include <gecode/support/auto-link.hpp>
#include <gecode/third-party/boost/numeric/interval.hpp>
#include <gecode/float/exception.hpp>
#include <gecode/float/nextafter.hpp>
#include <gecode/float/num.hpp>
#include <gecode/float/rounding.hpp>
#include <gecode/float/val.hpp>
#include <gecode/float/limits.hpp>
#include <gecode/float/var-imp.hpp>
#include <gecode/float/view.hpp>
#include <gecode/float/array-traits.hpp>
#include <gecode/float/array.hpp>
#include <gecode/float/channel.hpp>
#include <gecode/float/branch/traits.hpp>
#include <gecode/float/branch/afc.hpp>
#include <gecode/float/branch/action.hpp>
#include <gecode/float/branch/chb.hpp>
#include <gecode/float/branch/var.hpp>
#include <gecode/float/branch/val.hpp>
#include <gecode/float/branch/assign.hpp>
#include <gecode/float/trace/trace-view.hpp>
#include <gecode/float/trace/delta.hpp>
#include <gecode/float/trace/traits.hpp>
#include <gecode/float/trace.hpp>
Go to the source code of this file.
Classes | |
class | Gecode::Float::Rounding |
Floating point rounding policy. More... | |
class | Gecode::FloatVal |
Float value type. More... | |
class | Gecode::FloatVar |
Float variables. More... | |
class | Gecode::FloatValArgs |
Passing float arguments. More... | |
class | Gecode::FloatVarArgs |
Passing float variables. More... | |
class | Gecode::FloatVarArray |
Float variable array. More... | |
class | Gecode::FloatNumBranch |
Value description class for branching. More... | |
class | Gecode::FloatAFC |
Recording AFC information for float variables. More... | |
class | Gecode::FloatAction |
Recording actions for float variables. More... | |
class | Gecode::FloatCHB |
Recording CHB for float variables. More... | |
class | Gecode::FloatVarBranch |
Which variable to select for branching. More... | |
class | Gecode::FloatValBranch |
Which values to select for branching first. More... | |
class | Gecode::FloatAssign |
Which values to select for assignment. More... | |
class | Gecode::FloatTraceDelta |
Trace delta information for float variables. More... | |
class | Gecode::StdFloatTracer |
Standard float variable tracer. More... | |
Namespaces | |
namespace | Gecode::Float |
Floating point numbers. | |
namespace | Gecode |
Gecode toplevel namespace | |
namespace | Gecode::Float::Limits |
Numerical limits for floating point variables. | |
Defines | |
#define | GECODE_FLOAT_EXPORT |
#define | GECODE_LIBRARY_NAME "Float" |
Typedefs | |
typedef double | Gecode::FloatNum |
Floating point number base type. | |
typedef gecode_boost::numeric::interval_lib::rounded_arith_opp < FloatNum > | Gecode::Float::RoundingBase |
Rounding Base class (optimized version). | |
typedef std::function< bool(const Space &home, FloatVar x, int i)> | Gecode::FloatBranchFilter |
Branch filter function type for float variables. | |
typedef std::function< double(const Space &home, FloatVar x, int i)> | Gecode::FloatBranchMerit |
Branch merit function type for float variables. | |
typedef std::function < FloatNumBranch(const Space &home, FloatVar x, int i)> | Gecode::FloatBranchVal |
Branch value function type for float variables. | |
typedef std::function< void(Space &home, unsigned int a, FloatVar x, int i, FloatNumBranch nl)> | Gecode::FloatBranchCommit |
Branch commit function type for float variables. | |
typedef std::function< void(const Space &home, const Brancher &b, unsigned int a, FloatVar x, int i, const FloatNumBranch &n, std::ostream &o)> | Gecode::FloatVarValPrint |
Function type for explaining branching alternatives for float variables. | |
typedef ViewTracer < Float::FloatView > | Gecode::FloatTracer |
Tracer for float variables. | |
typedef ViewTraceRecorder < Float::FloatView > | Gecode::FloatTraceRecorder |
Trace recorder for float variables. | |
Enumerations | |
enum | Gecode::FloatRelType { Gecode::FRT_EQ, Gecode::FRT_NQ, Gecode::FRT_LQ, Gecode::FRT_LE, Gecode::FRT_GQ, Gecode::FRT_GR } |
Relation types for floats. More... | |
Functions | |
FloatNum | Gecode::pi_half_lower (void) |
Return lower bound of . | |
FloatNum | Gecode::pi_half_upper (void) |
Return upper bound of . | |
FloatNum | Gecode::pi_lower (void) |
Return lower bound of . | |
FloatNum | Gecode::pi_upper (void) |
Return upper bound of . | |
FloatNum | Gecode::pi_twice_lower (void) |
Return lower bound of . | |
FloatNum | Gecode::pi_twice_upper (void) |
Return upper bound of . | |
bool | Gecode::Float::Limits::valid (const FloatVal &n) |
Return whether float n is a valid number. | |
void | Gecode::Float::Limits::check (const FloatVal &n, const char *l) |
Check whether float n is a valid number, otherwise throw out of limits exception with information l. | |
void | Gecode::dom (Home home, FloatVar x, FloatVal n) |
Propagates . | |
void | Gecode::dom (Home home, const FloatVarArgs &x, FloatVal n) |
Propagates for all . | |
void | Gecode::dom (Home home, FloatVar x, FloatNum l, FloatNum m) |
Propagates . | |
void | Gecode::dom (Home home, const FloatVarArgs &x, FloatNum l, FloatNum u) |
Propagates for all . | |
void | Gecode::dom (Home home, FloatVar x, FloatVal n, Reify r) |
Post domain consistent propagator for . | |
void | Gecode::dom (Home home, FloatVar x, FloatNum l, FloatNum u, Reify r) |
Post domain consistent propagator for . | |
void | Gecode::dom (Home home, FloatVar x, FloatVar d) |
Constrain domain of x according to domain of d. | |
void | Gecode::dom (Home home, const FloatVarArgs &x, const FloatVarArgs &d) |
Constrain domain of according to domain of for all . | |
void | Gecode::rel (Home home, FloatVar x0, FloatRelType frt, FloatVar x1) |
Post propagator for . | |
void | Gecode::rel (Home home, FloatVar x, FloatRelType frt, FloatVal c) |
Propagates . | |
void | Gecode::rel (Home home, FloatVar x, FloatRelType frt, FloatVal c, Reify r) |
Post propagator for . | |
void | Gecode::rel (Home home, FloatVar x0, FloatRelType frt, FloatVar x1, Reify r) |
Post propagator for . | |
void | Gecode::rel (Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c) |
Propagates for all . | |
void | Gecode::rel (Home home, const FloatVarArgs &x, FloatRelType frt, FloatVar y) |
Propagates for all . | |
void | Gecode::ite (Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z) |
Post propagator for if-then-else constraint. | |
void | Gecode::min (Home home, FloatVar x0, FloatVar x1, FloatVar x2) |
Post propagator for . | |
void | Gecode::min (Home home, const FloatVarArgs &x, FloatVar y) |
Post propagator for If x is empty, an exception of type Float::TooFewArguments is thrown. | |
void | Gecode::max (Home home, FloatVar x0, FloatVar x1, FloatVar x2) |
Post propagator for . | |
void | Gecode::max (Home home, const FloatVarArgs &x, FloatVar y) |
Post propagator for If x is empty, an exception of type Float::TooFewArguments is thrown. | |
void | Gecode::abs (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::mult (Home home, FloatVar x0, FloatVar x1, FloatVar x2) |
Post propagator for . | |
void | Gecode::sqr (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::sqrt (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::pow (Home home, FloatVar x0, int n, FloatVar x1) |
Post propagator for for $n 0$. | |
void | Gecode::nroot (Home home, FloatVar x0, int n, FloatVar x1) |
Post propagator for for $n 0$. | |
void | Gecode::div (Home home, FloatVar x0, FloatVar x1, FloatVar x2) |
Post propagator for . | |
void | Gecode::exp (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::log (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::pow (Home home, FloatNum base, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::log (Home home, FloatNum base, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::asin (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::sin (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::acos (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::cos (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::atan (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::tan (Home home, FloatVar x0, FloatVar x1) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatVarArgs &x, FloatRelType frt, FloatVar y) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c, Reify r) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatVarArgs &x, FloatRelType frt, FloatVar y, Reify r) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatValArgs &a, const FloatVarArgs &x, FloatRelType frt, FloatVal c) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatValArgs &a, const FloatVarArgs &x, FloatRelType frt, FloatVar y) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatValArgs &a, const FloatVarArgs &x, FloatRelType frt, FloatVal c, Reify r) |
Post propagator for . | |
void | Gecode::linear (Home home, const FloatValArgs &a, const FloatVarArgs &x, FloatRelType frt, FloatVar y, Reify r) |
Post propagator for . | |
void | Gecode::channel (Home home, FloatVar x0, IntVar x1) |
Post propagator for channeling a float and an integer variable . | |
void | Gecode::channel (Home home, IntVar x0, FloatVar x1) |
Post propagator for channeling a float and an integer variable . | |
void | Gecode::channel (Home home, FloatVar x0, BoolVar x1) |
Post propagator for channeling a float and a Boolean variable . | |
void | Gecode::channel (Home home, BoolVar x0, FloatVar x1) |
Post propagator for channeling a float and a Boolean variable . | |
void | Gecode::wait (Home home, FloatVar x, std::function< void(Space &home)> c) |
Execute c when x becomes assigned. | |
void | Gecode::wait (Home home, const FloatVarArgs &x, std::function< void(Space &home)> c) |
Execute c when all variables in x become assigned. | |
FloatVarBranch | Gecode::FLOAT_VAR_NONE (void) |
Select first unassigned variable. | |
FloatVarBranch | Gecode::FLOAT_VAR_RND (Rnd r) |
Select random variable (uniform distribution, for tie breaking). | |
FloatVarBranch | Gecode::FLOAT_VAR_MERIT_MIN (FloatBranchMerit bm, BranchTbl tbl=nullptr) |
Select variable with least merit according to branch merit function bm. | |
FloatVarBranch | Gecode::FLOAT_VAR_MERIT_MAX (FloatBranchMerit bm, BranchTbl tbl=nullptr) |
Select variable with highest merit according to branch merit function bm. | |
FloatVarBranch | Gecode::FLOAT_VAR_DEGREE_MIN (BranchTbl tbl=nullptr) |
Select variable with smallest degree. | |
FloatVarBranch | Gecode::FLOAT_VAR_DEGREE_MAX (BranchTbl tbl=nullptr) |
Select variable with largest degree. | |
FloatVarBranch | Gecode::FLOAT_VAR_AFC_MIN (double d=1.0, BranchTbl tbl=nullptr) |
Select variable with smallest accumulated failure count with decay factor d. | |
FloatVarBranch | Gecode::FLOAT_VAR_AFC_MIN (FloatAFC a, BranchTbl tbl=nullptr) |
Select variable with smallest accumulated failure count. | |
FloatVarBranch | Gecode::FLOAT_VAR_AFC_MAX (double d=1.0, BranchTbl tbl=nullptr) |
Select variable with largest accumulated failure count with decay factor d. | |
FloatVarBranch | Gecode::FLOAT_VAR_AFC_MAX (FloatAFC a, BranchTbl tbl=nullptr) |
Select variable with largest accumulated failure count. | |
FloatVarBranch | Gecode::FLOAT_VAR_ACTION_MIN (double d=1.0, BranchTbl tbl=nullptr) |
Select variable with lowest action with decay factor d. | |
FloatVarBranch | Gecode::FLOAT_VAR_ACTION_MIN (FloatAction a, BranchTbl tbl=nullptr) |
Select variable with lowest action. | |
FloatVarBranch | Gecode::FLOAT_VAR_ACTION_MAX (double d=1.0, BranchTbl tbl=nullptr) |
Select variable with highest action with decay factor d. | |
FloatVarBranch | Gecode::FLOAT_VAR_ACTION_MAX (FloatAction a, BranchTbl tbl=nullptr) |
Select variable with highest action. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_MIN (BranchTbl tbl=nullptr) |
Select variable with lowest CHB Q-score. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_MIN (FloatCHB a, BranchTbl tbl=nullptr) |
Select variable with lowest CHB Q-score. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_MAX (BranchTbl tbl=nullptr) |
Select variable with highest CHB Q-score. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_MAX (FloatCHB a, BranchTbl tbl=nullptr) |
Select variable with highest CHB Q-score. | |
FloatVarBranch | Gecode::FLOAT_VAR_MIN_MIN (BranchTbl tbl=nullptr) |
Select variable with smallest min. | |
FloatVarBranch | Gecode::FLOAT_VAR_MIN_MAX (BranchTbl tbl=nullptr) |
Select variable with largest min. | |
FloatVarBranch | Gecode::FLOAT_VAR_MAX_MIN (BranchTbl tbl=nullptr) |
Select variable with smallest max. | |
FloatVarBranch | Gecode::FLOAT_VAR_MAX_MAX (BranchTbl tbl=nullptr) |
Select variable with largest max. | |
FloatVarBranch | Gecode::FLOAT_VAR_SIZE_MIN (BranchTbl tbl=nullptr) |
Select variable with smallest domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_SIZE_MAX (BranchTbl tbl=nullptr) |
Select variable with largest domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_DEGREE_SIZE_MIN (BranchTbl tbl=nullptr) |
Select variable with smallest degree divided by domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_DEGREE_SIZE_MAX (BranchTbl tbl=nullptr) |
Select variable with largest degree divided by domain size. | |
FloatVarBranch | Gecode::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. | |
FloatVarBranch | Gecode::FLOAT_VAR_AFC_SIZE_MIN (FloatAFC a, BranchTbl tbl=nullptr) |
Select variable with smallest accumulated failure count divided by domain size. | |
FloatVarBranch | Gecode::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. | |
FloatVarBranch | Gecode::FLOAT_VAR_AFC_SIZE_MAX (FloatAFC a, BranchTbl tbl=nullptr) |
Select variable with largest accumulated failure count divided by domain size. | |
FloatVarBranch | Gecode::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. | |
FloatVarBranch | Gecode::FLOAT_VAR_ACTION_SIZE_MIN (FloatAction a, BranchTbl tbl=nullptr) |
Select variable with smallest action divided by domain size. | |
FloatVarBranch | Gecode::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. | |
FloatVarBranch | Gecode::FLOAT_VAR_ACTION_SIZE_MAX (FloatAction a, BranchTbl tbl=nullptr) |
Select variable with largest action divided by domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_SIZE_MIN (BranchTbl tbl=nullptr) |
Select variable with smallest CHB Q-score divided by domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_SIZE_MIN (FloatCHB c, BranchTbl tbl=nullptr) |
Select variable with smallest CHB Q-score divided by domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_SIZE_MAX (BranchTbl tbl=nullptr) |
Select variable with largest CHB Q-score divided by domain size. | |
FloatVarBranch | Gecode::FLOAT_VAR_CHB_SIZE_MAX (FloatCHB a, BranchTbl tbl=nullptr) |
Select variable with largest CHB Q-score divided by domain size. | |
FloatValBranch | Gecode::FLOAT_VAL_SPLIT_MIN (void) |
Select values not greater than mean of smallest and largest value. | |
FloatValBranch | Gecode::FLOAT_VAL_SPLIT_MAX (void) |
Select values greater than mean of smallest and largest value. | |
FloatValBranch | Gecode::FLOAT_VAL_SPLIT_RND (Rnd r) |
Select values randomly which are not greater or not smaller than mean of largest and smallest value. | |
FloatValBranch | Gecode::FLOAT_VAL (FloatBranchVal v, FloatBranchCommit c) |
FloatAssign | Gecode::FLOAT_ASSIGN_MIN (void) |
Select median value of the lower part. | |
FloatAssign | Gecode::FLOAT_ASSIGN_MAX (void) |
Select median value of the upper part. | |
FloatAssign | Gecode::FLOAT_ASSIGN_RND (Rnd r) |
Select median value of a randomly chosen part. | |
FloatAssign | Gecode::FLOAT_ASSIGN (FloatBranchVal v, FloatBranchCommit c) |
void | Gecode::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. | |
void | Gecode::branch (Home home, const FloatVarArgs &x, TieBreak< FloatVarBranch > vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr) |
Branch over x with tie-breaking variable selection vars and value selection vals. | |
void | Gecode::branch (Home home, FloatVar x, FloatValBranch vals, FloatVarValPrint vvp=nullptr) |
Branch over x with value selection vals. | |
void | Gecode::assign (Home home, const FloatVarArgs &x, FloatAssign vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr) |
Assign all x with value selection vals. | |
void | Gecode::assign (Home home, FloatVar x, FloatAssign vals, FloatVarValPrint vvp=nullptr) |
Assign x with value selection vals. | |
void | Gecode::relax (Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p) |
void | Gecode::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. | |
void | Gecode::trace (Home home, const FloatVarArgs &x, int te=(TE_INIT|TE_PRUNE|TE_FIX|TE_FAIL|TE_DONE), FloatTracer &t=StdFloatTracer::def) |
Create a tracer for float variables. | |
Variables | |
const FloatNum | Gecode::Float::Limits::max = std::numeric_limits<FloatNum>::max() |
Largest allowed float value. | |
const FloatNum | Gecode::Float::Limits::min = -max |
Smallest allowed float value. |