float.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
* Guido Tack <tack@gecode.org>
* Vincent Barichard <Vincent.Barichard@univ-angers.fr>
*
* Copyright:
* Christian Schulte, 2002
* Guido Tack, 2004
* Vincent Barichard, 2012
*
* 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.
*
*/
#ifndef __GECODE_FLOAT_HH__
#define __GECODE_FLOAT_HH__
#include <climits>
#include <cfloat>
#include <iostream>
#include <functional>
#include <gecode/kernel.hh>
#include <gecode/int.hh>
/*
* Configure linking
*
*/
#if !defined(GECODE_STATIC_LIBS) && \
(defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
#ifdef GECODE_BUILD_FLOAT
#define GECODE_FLOAT_EXPORT __declspec( dllexport )
#else
#define GECODE_FLOAT_EXPORT __declspec( dllimport )
#endif
#else
#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
#define GECODE_FLOAT_EXPORT __attribute__ ((visibility("default")))
#else
#define GECODE_FLOAT_EXPORT
#endif
#endif
// Configure auto-linking
#ifndef GECODE_BUILD_FLOAT
#define GECODE_LIBRARY_NAME "Float"
#include <gecode/support/auto-link.hpp>
#endif
// Include interval implementation
#include <boost/numeric/interval.hpp>
#include <gecode/float/exception.hpp>
#include <gecode/float/nextafter.hpp>
namespace Gecode {
typedef double FloatNum;
FloatNum pi_half_lower(void);
FloatNum pi_half_upper(void);
FloatNum pi_lower(void);
FloatNum pi_upper(void);
FloatNum pi_twice_lower(void);
FloatNum pi_twice_upper(void);
// Forward declaration
class FloatVal;
}
#include <gecode/float/num.hpp>
namespace Gecode { namespace Float {
#if defined(_MSC_VER) && (defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP > 0)))
/*
* This is used for the MSVC compiler for x64 or x86 with SSE enabled.
*
*/
typedef boost::numeric::interval_lib::save_state< boost::numeric::interval_lib::rounded_arith_std<FloatNum> >
RoundingBase;
#else
typedef boost::numeric::interval_lib::rounded_arith_opp<FloatNum>
RoundingBase;
#endif
class Rounding : public RoundingBase {
public:
Rounding(void);
~Rounding(void);
FloatNum add_down(FloatNum x, FloatNum y);
FloatNum add_up (FloatNum x, FloatNum y);
FloatNum sub_down(FloatNum x, FloatNum y);
FloatNum sub_up (FloatNum x, FloatNum y);
FloatNum mul_down(FloatNum x, FloatNum y);
FloatNum mul_up (FloatNum x, FloatNum y);
FloatNum div_down(FloatNum x, FloatNum y);
FloatNum div_up (FloatNum x, FloatNum y);
FloatNum sqrt_down(FloatNum x);
FloatNum sqrt_up (FloatNum x);
FloatNum median(FloatNum x, FloatNum y);
FloatNum int_down(FloatNum x);
FloatNum int_up (FloatNum x);
#ifdef GECODE_HAS_MPFR
GECODE_FLOAT_EXPORT FloatNum exp_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum exp_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum log_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum log_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum sin_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum sin_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum cos_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum cos_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum tan_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum tan_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum asin_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum asin_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum acos_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum acos_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum atan_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum atan_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum sinh_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum sinh_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum cosh_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum cosh_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum tanh_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum tanh_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum asinh_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum asinh_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum acosh_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum acosh_up (FloatNum x);
GECODE_FLOAT_EXPORT FloatNum atanh_down(FloatNum x);
GECODE_FLOAT_EXPORT FloatNum atanh_up (FloatNum x);
#endif
};
}}
#include <gecode/float/rounding.hpp>
namespace Gecode { namespace Float {
bool subset(const FloatVal& x, const FloatVal& y);
bool proper_subset(const FloatVal& x, const FloatVal& y);
bool overlap(const FloatVal& x, const FloatVal& y);
FloatVal intersect(const FloatVal& x, const FloatVal& y);
FloatVal hull(const FloatVal& x, const FloatVal& y);
FloatVal hull(const FloatVal& x, const FloatNum& y);
FloatVal hull(const FloatNum& x, const FloatVal& y);
FloatVal hull(const FloatNum& x, const FloatNum& y);
}}
namespace Gecode {
class FloatVal {
friend FloatVal operator +(const FloatVal& x);
friend FloatVal operator -(const FloatVal& x);
friend FloatVal operator +(const FloatVal& x, const FloatVal& y);
friend FloatVal operator +(const FloatVal& x, const FloatNum& y);
friend FloatVal operator +(const FloatNum& x, const FloatVal& y);
friend FloatVal operator -(const FloatVal& x, const FloatVal& y);
friend FloatVal operator -(const FloatVal& x, const FloatNum& y);
friend FloatVal operator -(const FloatNum& x, const FloatVal& y);
friend FloatVal operator *(const FloatVal& x, const FloatVal& y);
friend FloatVal operator *(const FloatVal& x, const FloatNum& y);
friend FloatVal operator *(const FloatNum& x, const FloatVal& y);
friend FloatVal operator /(const FloatVal& x, const FloatVal& y);
friend FloatVal operator /(const FloatVal& x, const FloatNum& y);
friend FloatVal operator /(const FloatNum& x, const FloatVal& y);
friend bool operator <(const FloatVal& x, const FloatVal& y);
friend bool operator <(const FloatVal& x, const FloatNum& y);
friend bool operator <(const FloatNum& x, const FloatVal& y);
friend bool operator <=(const FloatVal& x, const FloatVal& y);
friend bool operator <=(const FloatVal& x, const FloatNum& y);
friend bool operator <=(const FloatNum& x, const FloatVal& y);
friend bool operator >(const FloatVal& x, const FloatVal& y);
friend bool operator >(const FloatVal& x, const FloatNum& y);
friend bool operator >(const FloatNum& x, const FloatVal& y);
friend bool operator >=(const FloatVal& x, const FloatVal& y);
friend bool operator >=(const FloatVal& x, const FloatNum& y);
friend bool operator >=(const FloatNum& x, const FloatVal& y);
friend bool operator ==(const FloatVal& x, const FloatVal& y);
friend bool operator ==(const FloatVal& x, const FloatNum& y);
friend bool operator ==(const FloatNum& x, const FloatVal& y);
friend bool operator !=(const FloatVal& x, const FloatVal& y);
friend bool operator !=(const FloatVal& x, const FloatNum& y);
friend bool operator !=(const FloatNum& x, const FloatVal& y);
template<class Char, class Traits>
friend std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const FloatVal& x);
friend FloatVal abs(const FloatVal& x);
friend FloatVal sqrt(const FloatVal& x);
friend FloatVal sqr(const FloatVal& x);
friend FloatVal pow(const FloatVal& x, int n);
friend FloatVal nroot(const FloatVal& x, int n);
friend FloatVal max(const FloatVal& x, const FloatVal& y);
friend FloatVal max(const FloatVal& x, const FloatNum& y);
friend FloatVal max(const FloatNum& x, const FloatVal& y);
friend FloatVal min(const FloatVal& x, const FloatVal& y);
friend FloatVal min(const FloatVal& x, const FloatNum& y);
friend FloatVal min(const FloatNum& x, const FloatVal& y);
#ifdef GECODE_HAS_MPFR
friend FloatVal exp(const FloatVal& x);
friend FloatVal log(const FloatVal& x);
friend FloatVal fmod(const FloatVal& x, const FloatVal& y);
friend FloatVal fmod(const FloatVal& x, const FloatNum& y);
friend FloatVal fmod(const FloatNum& x, const FloatVal& y);
friend FloatVal sin(const FloatVal& x);
friend FloatVal cos(const FloatVal& x);
friend FloatVal tan(const FloatVal& x);
friend FloatVal asin(const FloatVal& x);
friend FloatVal acos(const FloatVal& x);
friend FloatVal atan(const FloatVal& x);
friend FloatVal sinh(const FloatVal& x);
friend FloatVal cosh(const FloatVal& x);
friend FloatVal tanh(const FloatVal& x);
friend FloatVal asinh(const FloatVal& x);
friend FloatVal acosh(const FloatVal& x);
friend FloatVal atanh(const FloatVal& x);
#endif
friend bool Float::subset(const FloatVal& x, const FloatVal& y);
friend bool Float::proper_subset(const FloatVal& x, const FloatVal& y);
friend bool Float::overlap(const FloatVal& x, const FloatVal& y);
friend FloatVal Float::intersect(const FloatVal& x, const FloatVal& y);
friend FloatVal Float::hull(const FloatVal& x, const FloatVal& y);
friend FloatVal Float::hull(const FloatVal& x, const FloatNum& y);
friend FloatVal Float::hull(const FloatNum& x, const FloatVal& y);
friend FloatVal Float::hull(const FloatNum& x, const FloatNum& y);
protected:
typedef boost::numeric::interval_lib::save_state<Float::Rounding> R;
typedef boost::numeric::interval_lib::checking_strict<FloatNum> P;
typedef boost::numeric::interval
<FloatNum,
boost::numeric::interval_lib::policies<R, P> >
FloatValImpType;
FloatValImpType x;
explicit FloatVal(const FloatValImpType& i);
public:
FloatVal(void);
FloatVal(const FloatNum& n);
FloatVal(const FloatNum& l, const FloatNum& u);
FloatVal(const FloatVal& v);
FloatVal& operator =(const FloatNum& n);
FloatVal& operator =(const FloatVal& v);
void assign(FloatNum const &l, FloatNum const &u);
FloatNum min(void) const;
FloatNum max(void) const;
FloatNum size(void) const;
FloatNum med(void) const;
bool tight(void) const;
bool singleton(void) const;
bool in(FloatNum n) const;
bool zero_in(void) const;
static FloatVal hull(FloatNum x, FloatNum y);
static FloatVal pi_half(void);
static FloatVal pi(void);
static FloatVal pi_twice(void);
FloatVal& operator +=(const FloatNum& n);
FloatVal& operator -=(const FloatNum& n);
FloatVal& operator *=(const FloatNum& n);
FloatVal& operator /=(const FloatNum& n);
FloatVal& operator +=(const FloatVal& v);
FloatVal& operator -=(const FloatVal& v);
FloatVal& operator *=(const FloatVal& v);
FloatVal& operator /=(const FloatVal& v);
};
FloatVal operator +(const FloatVal& x);
FloatVal operator -(const FloatVal& x);
FloatVal operator +(const FloatVal& x, const FloatVal& y);
FloatVal operator +(const FloatVal& x, const FloatNum& y);
FloatVal operator +(const FloatNum& x, const FloatVal& y);
FloatVal operator -(const FloatVal& x, const FloatVal& y);
FloatVal operator -(const FloatVal& x, const FloatNum& y);
FloatVal operator -(const FloatNum& x, const FloatVal& y);
FloatVal operator *(const FloatVal& x, const FloatVal& y);
FloatVal operator *(const FloatVal& x, const FloatNum& y);
FloatVal operator *(const FloatNum& x, const FloatVal& y);
FloatVal operator /(const FloatVal& x, const FloatVal& y);
FloatVal operator /(const FloatVal& x, const FloatNum& y);
FloatVal operator /(const FloatNum& r, const FloatVal& x);
bool operator <(const FloatVal& x, const FloatVal& y);
bool operator <(const FloatVal& x, const FloatNum& y);
bool operator <(const FloatNum& x, const FloatVal& y);
bool operator <=(const FloatVal& x, const FloatVal& y);
bool operator <=(const FloatVal& x, const FloatNum& y);
bool operator <=(const FloatNum& x, const FloatVal& y);
bool operator >(const FloatVal& x, const FloatVal& y);
bool operator >(const FloatVal& x, const FloatNum& y);
bool operator >(const FloatNum& x, const FloatVal& y);
bool operator >=(const FloatVal& x, const FloatVal& y);
bool operator >=(const FloatVal& x, const FloatNum& y);
bool operator >=(const FloatNum& x, const FloatVal& y);
bool operator ==(const FloatVal& x, const FloatVal& y);
bool operator ==(const FloatVal& x, const FloatNum& y);
bool operator ==(const FloatNum& x, const FloatVal& y);
bool operator !=(const FloatVal& x, const FloatVal& y);
bool operator !=(const FloatVal& x, const FloatNum& y);
bool operator !=(const FloatNum& x, const FloatVal& y);
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const FloatVal& x);
FloatVal abs(const FloatVal& x);
FloatVal sqrt(const FloatVal& x);
FloatVal sqr(const FloatVal& x);
FloatVal pow(const FloatVal& x, int n);
FloatVal nroot(const FloatVal& x, int n);
FloatVal max(const FloatVal& x, const FloatVal& y);
FloatVal max(const FloatVal& x, const FloatNum& y);
FloatVal max(const FloatNum& x, const FloatVal& y);
FloatVal min(const FloatVal& x, const FloatVal& y);
FloatVal min(const FloatVal& x, const FloatNum& y);
FloatVal min(const FloatNum& x, const FloatVal& y);
#ifdef GECODE_HAS_MPFR
/* transcendental functions: exp, log */
FloatVal exp(const FloatVal& x);
FloatVal log(const FloatVal& x);
FloatVal fmod(const FloatVal& x, const FloatVal& y);
FloatVal fmod(const FloatVal& x, const FloatNum& y);
FloatVal fmod(const FloatNum& x, const FloatVal& y);
FloatVal sin(const FloatVal& x);
FloatVal cos(const FloatVal& x);
FloatVal tan(const FloatVal& x);
FloatVal asin(const FloatVal& x);
FloatVal acos(const FloatVal& x);
FloatVal atan(const FloatVal& x);
FloatVal sinh(const FloatVal& x);
FloatVal cosh(const FloatVal& x);
FloatVal tanh(const FloatVal& x);
FloatVal asinh(const FloatVal& x);
FloatVal acosh(const FloatVal& x);
FloatVal atanh(const FloatVal& x);
#endif
}
#include <gecode/float/val.hpp>
namespace Gecode { namespace Float {
namespace Limits {
const FloatNum max = std::numeric_limits<FloatNum>::max();
const FloatNum min = -max;
bool valid(const FloatVal& n);
void check(const FloatVal& n, const char* l);
}
}}
#include <gecode/float/limits.hpp>
#include <gecode/float/var-imp.hpp>
namespace Gecode {
namespace Float {
class FloatView;
}
class FloatVar : public VarImpVar<Float::FloatVarImp> {
friend class FloatVarArray;
friend class FloatVarArgs;
private:
using VarImpVar<Float::FloatVarImp>::x;
void _init(Space& home, FloatNum min, FloatNum max);
public:
FloatVar(void);
FloatVar(const FloatVar& y);
FloatVar(const Float::FloatView& y);
GECODE_FLOAT_EXPORT FloatVar(Space& home, FloatNum min, FloatNum max);
FloatVal domain(void) const;
FloatNum min(void) const;
FloatNum max(void) const;
FloatNum med(void) const;
FloatNum size(void) const;
FloatVal val(void) const;
bool in(const FloatVal& n) const;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const FloatVar& x);
}
#include <gecode/float/view.hpp>
#include <gecode/float/array-traits.hpp>
namespace Gecode {
class FloatValArgs : public ArgArray<FloatVal> {
public:
FloatValArgs(void);
explicit FloatValArgs(int n);
FloatValArgs(const SharedArray<FloatVal>& x);
FloatValArgs(const std::vector<FloatVal>& x);
FloatValArgs(std::initializer_list<FloatVal> x);
template<class InputIterator>
FloatValArgs(InputIterator first, InputIterator last);
FloatValArgs(int n, const FloatVal* e);
FloatValArgs(const ArgArray<FloatVal>& a);
GECODE_FLOAT_EXPORT
static FloatValArgs create(int n, FloatVal start, int inc=1);
};
class FloatVarArgs : public VarArgArray<FloatVar> {
public:
FloatVarArgs(void);
explicit FloatVarArgs(int n);
FloatVarArgs(const FloatVarArgs& a);
FloatVarArgs(const VarArray<FloatVar>& a);
FloatVarArgs(const std::vector<FloatVar>& a);
FloatVarArgs(std::initializer_list<FloatVar> a);
template<class InputIterator>
FloatVarArgs(InputIterator first, InputIterator last);
GECODE_FLOAT_EXPORT
FloatVarArgs(Space& home, int n, FloatNum min, FloatNum max);
};
class FloatVarArray : public VarArray<FloatVar> {
public:
FloatVarArray(void);
FloatVarArray(Space& home, int n);
FloatVarArray(const FloatVarArray& a);
FloatVarArray(Space& home, const FloatVarArgs& a);
GECODE_FLOAT_EXPORT
FloatVarArray(Space& home, int n, FloatNum min, FloatNum max);
};
}
#include <gecode/float/array.hpp>
namespace Gecode {
enum FloatRelType {
FRT_EQ,
FRT_NQ,
FRT_LQ,
FRT_LE,
FRT_GQ,
FRT_GR
};
GECODE_FLOAT_EXPORT void
dom(Home home, FloatVar x, FloatVal n);
GECODE_FLOAT_EXPORT void
dom(Home home, const FloatVarArgs& x, FloatVal n);
GECODE_FLOAT_EXPORT void
dom(Home home, FloatVar x, FloatNum l, FloatNum m);
GECODE_FLOAT_EXPORT void
dom(Home home, const FloatVarArgs& x, FloatNum l, FloatNum u);
GECODE_FLOAT_EXPORT void
dom(Home home, FloatVar x, FloatVal n, Reify r);
GECODE_FLOAT_EXPORT void
dom(Home home, FloatVar x, FloatNum l, FloatNum u, Reify r);
GECODE_FLOAT_EXPORT void
dom(Home home, FloatVar x, FloatVar d);
GECODE_FLOAT_EXPORT void
dom(Home home, const FloatVarArgs& x, const FloatVarArgs& d);
GECODE_FLOAT_EXPORT void
rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1);
GECODE_FLOAT_EXPORT void
rel(Home home, FloatVar x, FloatRelType frt, FloatVal c);
GECODE_FLOAT_EXPORT void
rel(Home home, FloatVar x, FloatRelType frt, FloatVal c, Reify r);
GECODE_FLOAT_EXPORT void
rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1, Reify r);
GECODE_FLOAT_EXPORT void
rel(Home home, const FloatVarArgs& x, FloatRelType frt, FloatVal c);
GECODE_FLOAT_EXPORT void
rel(Home home, const FloatVarArgs& x, FloatRelType frt, FloatVar y);
GECODE_FLOAT_EXPORT void
ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z);
}
namespace Gecode {
GECODE_FLOAT_EXPORT void
min(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
GECODE_FLOAT_EXPORT void
min(Home home, const FloatVarArgs& x, FloatVar y);
GECODE_FLOAT_EXPORT void
max(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
GECODE_FLOAT_EXPORT void
max(Home home, const FloatVarArgs& x, FloatVar y);
GECODE_FLOAT_EXPORT void
abs(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
GECODE_FLOAT_EXPORT void
sqr(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
sqrt(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
pow(Home home, FloatVar x0, int n, FloatVar x1);
GECODE_FLOAT_EXPORT void
nroot(Home home, FloatVar x0, int n, FloatVar x1);
GECODE_FLOAT_EXPORT void
div(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
#ifdef GECODE_HAS_MPFR
GECODE_FLOAT_EXPORT void
exp(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
log(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
pow(Home home, FloatNum base, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
log(Home home, FloatNum base, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
asin(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
sin(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
acos(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
cos(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
atan(Home home, FloatVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
tan(Home home, FloatVar x0, FloatVar x1);
#endif
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatVarArgs& x,
FloatRelType frt, FloatVal c);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatVarArgs& x,
FloatRelType frt, FloatVar y);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatVarArgs& x,
FloatRelType frt, FloatVal c, Reify r);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatVarArgs& x,
FloatRelType frt, FloatVar y, Reify r);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatValArgs& a, const FloatVarArgs& x,
FloatRelType frt, FloatVal c);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatValArgs& a, const FloatVarArgs& x,
FloatRelType frt, FloatVar y);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatValArgs& a, const FloatVarArgs& x,
FloatRelType frt, FloatVal c, Reify r);
GECODE_FLOAT_EXPORT void
linear(Home home, const FloatValArgs& a, const FloatVarArgs& x,
FloatRelType frt, FloatVar y, Reify r);
GECODE_FLOAT_EXPORT void
channel(Home home, FloatVar x0, IntVar x1);
void
channel(Home home, IntVar x0, FloatVar x1);
GECODE_FLOAT_EXPORT void
channel(Home home, FloatVar x0, BoolVar x1);
void
channel(Home home, BoolVar x0, FloatVar x1);
}
#include <gecode/float/channel.hpp>
namespace Gecode {
GECODE_FLOAT_EXPORT void
wait(Home home, FloatVar x, std::function<void(Space& home)> c);
GECODE_FLOAT_EXPORT void
wait(Home home, const FloatVarArgs& x, std::function<void(Space& home)> c);
}
namespace Gecode {
typedef std::function<bool(const Space& home, FloatVar x, int i)>
FloatBranchFilter;
typedef std::function<double(const Space& home, FloatVar x, int i)>
FloatBranchMerit;
class FloatNumBranch {
public:
FloatNum n;
bool l;
};
typedef std::function<FloatNumBranch(const Space& home, FloatVar x, int i)>
FloatBranchVal;
typedef std::function<void(Space& home, unsigned int a,
FloatVar x, int i, FloatNumBranch nl)>
FloatBranchCommit;
}
#include <gecode/float/branch/traits.hpp>
namespace Gecode {
class FloatAFC : public AFC {
public:
FloatAFC(void);
FloatAFC(const FloatAFC& a);
FloatAFC& operator =(const FloatAFC& a);
FloatAFC(Home home, const FloatVarArgs& x, double d=1.0, bool share=true);
void init(Home home, const FloatVarArgs& x, double d=1.0, bool share=true);
};
}
#include <gecode/float/branch/afc.hpp>
namespace Gecode {
class FloatAction : public Action {
public:
FloatAction(void);
FloatAction(const FloatAction& a);
FloatAction& operator =(const FloatAction& a);
GECODE_FLOAT_EXPORT
FloatAction(Home home, const FloatVarArgs& x, double d=1.0,
FloatBranchMerit bm=nullptr);
GECODE_FLOAT_EXPORT void
init(Home home, const FloatVarArgs& x, double d=1.0,
FloatBranchMerit bm=nullptr);
};
}
#include <gecode/float/branch/action.hpp>
namespace Gecode {
class FloatCHB : public CHB {
public:
FloatCHB(void);
FloatCHB(const FloatCHB& chb);
FloatCHB& operator =(const FloatCHB& chb);
GECODE_FLOAT_EXPORT
FloatCHB(Home home, const FloatVarArgs& x, FloatBranchMerit bm=nullptr);
GECODE_FLOAT_EXPORT void
init(Home home, const FloatVarArgs& x, FloatBranchMerit bm=nullptr);
};
}
#include <gecode/float/branch/chb.hpp>
namespace Gecode {
typedef std::function<void(const Space &home, const Brancher& b,
unsigned int a,
FloatVar x, int i, const FloatNumBranch& n,
std::ostream& o)>
FloatVarValPrint;
}
namespace Gecode {
class FloatVarBranch : public VarBranch<FloatVar> {
public:
enum Select {
SEL_NONE = 0,
SEL_RND,
SEL_MERIT_MIN,
SEL_MERIT_MAX,
SEL_DEGREE_MIN,
SEL_DEGREE_MAX,
SEL_AFC_MIN,
SEL_AFC_MAX,
SEL_ACTION_MIN,
SEL_ACTION_MAX,
SEL_CHB_MIN,
SEL_CHB_MAX,
SEL_MIN_MIN,
SEL_MIN_MAX,
SEL_MAX_MIN,
SEL_MAX_MAX,
SEL_SIZE_MIN,
SEL_SIZE_MAX,
SEL_DEGREE_SIZE_MIN,
SEL_DEGREE_SIZE_MAX,
SEL_AFC_SIZE_MIN,
SEL_AFC_SIZE_MAX,
SEL_ACTION_SIZE_MIN,
SEL_ACTION_SIZE_MAX,
SEL_CHB_SIZE_MIN,
SEL_CHB_SIZE_MAX
};
protected:
Select s;
public:
FloatVarBranch(void);
FloatVarBranch(Rnd r);
FloatVarBranch(Select s, BranchTbl t);
FloatVarBranch(Select s, double, BranchTbl t);
FloatVarBranch(Select s, FloatAFC a, BranchTbl t);
FloatVarBranch(Select s, FloatAction a, BranchTbl t);
FloatVarBranch(Select s, FloatCHB c, BranchTbl t);
FloatVarBranch(Select s, FloatBranchMerit mf, BranchTbl t);
Select select(void) const;
void expand(Home home, const FloatVarArgs& x);
};
FloatVarBranch FLOAT_VAR_NONE(void);
FloatVarBranch FLOAT_VAR_RND(Rnd r);
FloatVarBranch FLOAT_VAR_MERIT_MIN(FloatBranchMerit bm, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_MERIT_MAX(FloatBranchMerit bm, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_DEGREE_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_DEGREE_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_MIN(FloatAFC a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_MAX(FloatAFC a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_MIN(FloatAction a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_MAX(FloatAction a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_MIN(FloatCHB a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_MAX(FloatCHB a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_MIN_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_MIN_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_MAX_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_MAX_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_SIZE_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_SIZE_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_SIZE_MIN(FloatAFC a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_AFC_SIZE_MAX(FloatAFC a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MIN(FloatAction a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_ACTION_SIZE_MAX(FloatAction a, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_SIZE_MIN(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_SIZE_MIN(FloatCHB c, BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_SIZE_MAX(BranchTbl tbl=nullptr);
FloatVarBranch FLOAT_VAR_CHB_SIZE_MAX(FloatCHB a, BranchTbl tbl=nullptr);
}
#include <gecode/float/branch/var.hpp>
namespace Gecode {
class FloatValBranch : public ValBranch<FloatVar> {
public:
enum Select {
SEL_SPLIT_MIN,
SEL_SPLIT_MAX,
SEL_SPLIT_RND,
SEL_VAL_COMMIT
};
protected:
Select s;
public:
FloatValBranch(Select s = SEL_SPLIT_MIN);
FloatValBranch(Rnd r);
FloatValBranch(FloatBranchVal v, FloatBranchCommit c);
Select select(void) const;
};
FloatValBranch FLOAT_VAL_SPLIT_MIN(void);
FloatValBranch FLOAT_VAL_SPLIT_MAX(void);
FloatValBranch FLOAT_VAL_SPLIT_RND(Rnd r);
FloatValBranch FLOAT_VAL(FloatBranchVal v, FloatBranchCommit c=nullptr);
}
#include <gecode/float/branch/val.hpp>
namespace Gecode {
class FloatAssign : public ValBranch<FloatVar> {
public:
enum Select {
SEL_MIN,
SEL_MAX,
SEL_RND,
SEL_VAL_COMMIT
};
protected:
Select s;
public:
FloatAssign(Select s = SEL_MIN);
FloatAssign(Rnd r);
FloatAssign(FloatBranchVal v, FloatBranchCommit c);
Select select(void) const;
};
FloatAssign FLOAT_ASSIGN_MIN(void);
FloatAssign FLOAT_ASSIGN_MAX(void);
FloatAssign FLOAT_ASSIGN_RND(Rnd r);
FloatAssign FLOAT_ASSIGN(FloatBranchVal v, FloatBranchCommit c=nullptr);
}
#include <gecode/float/branch/assign.hpp>
namespace Gecode {
GECODE_FLOAT_EXPORT void
branch(Home home, const FloatVarArgs& x,
FloatVarBranch vars, FloatValBranch vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
GECODE_FLOAT_EXPORT void
branch(Home home, const FloatVarArgs& x,
TieBreak<FloatVarBranch> vars, FloatValBranch vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
GECODE_FLOAT_EXPORT void
branch(Home home, FloatVar x, FloatValBranch vals,
FloatVarValPrint vvp=nullptr);
GECODE_FLOAT_EXPORT void
assign(Home home, const FloatVarArgs& x,
FloatVarBranch vars, FloatAssign vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
GECODE_FLOAT_EXPORT void
assign(Home home, const FloatVarArgs& x,
TieBreak<FloatVarBranch> vars, FloatAssign vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
GECODE_FLOAT_EXPORT void
assign(Home home, FloatVar x, FloatAssign vals,
FloatVarValPrint vvp=nullptr);
}
namespace Gecode {
void
branch(Home home, const FloatVarArgs& x, FloatValBranch vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
void
assign(Home home, const FloatVarArgs& x, FloatAssign vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
}
#include <gecode/float/branch.hpp>
namespace Gecode {
/*
* \brief Relaxed assignment of variables in \a x from values in \a sx
*
* The variables in \a x are assigned values from the assigned variables
* in the solution \a sx with a relaxation probability \a p. That is,
* if \$fp=0.1\f$ approximately 10% of the variables in \a x will be
* assigned a value from \a sx.
*
* The random numbers are generated from the generator \a r. At least
* one variable will not be assigned: in case the relaxation attempt
* would suggest that all variables should be assigned, a single
* variable will be selected randomly to remain unassigned.
*
* Throws an exception of type Float::ArgumentSizeMismatch, if \a x and
* \a sx are of different size.
*
* Throws an exception of type Float::OutOfLimits, if \a p is not between
* \a 0.0 and \a 1.0.
*
* \ingroup TaskModeFloat
*/
GECODE_FLOAT_EXPORT void
relax(Home home, const FloatVarArgs& x, const FloatVarArgs& sx,
Rnd r, double p);
}
#include <gecode/float/trace/trace-view.hpp>
namespace Gecode {
class FloatTraceDelta {
protected:
Float::FloatView n;
const Delta& d;
public:
FloatTraceDelta(Float::FloatTraceView o, Float::FloatView n,
const Delta& d);
FloatNum min(void) const;
FloatNum max(void) const;
};
}
#include <gecode/float/trace/delta.hpp>
#include <gecode/float/trace/traits.hpp>
namespace Gecode {
typedef ViewTracer<Float::FloatView> FloatTracer;
typedef ViewTraceRecorder<Float::FloatView> FloatTraceRecorder;
class GECODE_FLOAT_EXPORT StdFloatTracer : public FloatTracer {
protected:
std::ostream& os;
public:
StdFloatTracer(std::ostream& os0 = std::cerr);
virtual void init(const Space& home, const FloatTraceRecorder& t);
virtual void prune(const Space& home, const FloatTraceRecorder& t,
const ViewTraceInfo& vti, int i, FloatTraceDelta& d);
virtual void fix(const Space& home, const FloatTraceRecorder& t);
virtual void fail(const Space& home, const FloatTraceRecorder& t);
virtual void done(const Space& home, const FloatTraceRecorder& t);
static StdFloatTracer def;
};
GECODE_FLOAT_EXPORT 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);
void
trace(Home home, const FloatVarArgs& x,
int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
FloatTracer& t = StdFloatTracer::def);
}
#include <gecode/float/trace.hpp>
#endif
// IFDEF: GECODE_HAS_FLOAT_VARS
// STATISTICS: float-post
auto-link.hpp
Gecode::AFC::AFC
AFC(void)
Construct as not yet intialized.
Definition afc.hpp:119
Gecode::Action::Action
Action(void)
Construct as not yet intialized.
Definition action.hpp:323
Gecode::ArgArrayBase< FloatVal >::a
FloatVal * a
Definition array.hpp:544
Gecode::ArgArrayBase< FloatVal >::n
int n
Definition array.hpp:540
Gecode::ArgArray< FloatVal >::ArgArray
ArgArray(void)
Definition array.hpp:1750
Gecode::BoolVar
Boolean integer variables.
Definition int.hh:512
Gecode::CHB::CHB
CHB(void)
Construct as not yet intialized.
Definition chb.hpp:346
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::FloatAFC
Recording AFC information for float variables.
Definition float.hh:1509
Gecode::FloatAFC::init
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
Gecode::FloatAFC::FloatAFC
FloatAFC(void)
Construct as not yet initialized.
Definition afc.hpp:37
Gecode::FloatAFC::operator=
FloatAFC & operator=(const FloatAFC &a)
Assignment operator.
Definition afc.hpp:44
Gecode::FloatAction
Recording actions for float variables.
Definition float.hh:1555
Gecode::FloatAction::operator=
FloatAction & operator=(const FloatAction &a)
Assignment operator.
Definition action.hpp:44
Gecode::FloatAction::init
void init(Home home, const FloatVarArgs &x, double d=1.0, FloatBranchMerit bm=nullptr)
Initialize for float variables x with decay factor d.
Definition action.cpp:45
Gecode::FloatAction::FloatAction
FloatAction(void)
Construct as not yet initialized.
Definition action.hpp:37
Gecode::FloatAssign
Which values to select for assignment.
Definition float.hh:1874
Gecode::FloatAssign::Select
Select
Which value selection.
Definition float.hh:1877
Gecode::FloatAssign::SEL_MAX
@ SEL_MAX
Select median value of the upper part.
Definition float.hh:1879
Gecode::FloatAssign::SEL_VAL_COMMIT
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition float.hh:1881
Gecode::FloatAssign::SEL_RND
@ SEL_RND
Select median value of a randomly chosen part.
Definition float.hh:1880
Gecode::FloatAssign::SEL_MIN
@ SEL_MIN
Select median value of the lower part.
Definition float.hh:1878
Gecode::FloatAssign::s
Select s
Which value to select.
Definition float.hh:1885
Gecode::FloatAssign::FloatAssign
FloatAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition assign.hpp:37
Gecode::FloatAssign::select
Select select(void) const
Return selection strategy.
Definition assign.hpp:49
Gecode::FloatCHB
Recording CHB for float variables.
Definition float.hh:1607
Gecode::FloatCHB::operator=
FloatCHB & operator=(const FloatCHB &chb)
Assignment operator.
Definition chb.hpp:44
Gecode::FloatCHB::init
void init(Home home, const FloatVarArgs &x, FloatBranchMerit bm=nullptr)
Initialize for float variables x.
Definition chb.cpp:44
Gecode::FloatCHB::FloatCHB
FloatCHB(void)
Construct as not yet initialized.
Definition chb.hpp:37
Gecode::FloatNumBranch
Value description class for branching.
Definition float.hh:1462
Gecode::FloatNumBranch::l
bool l
Whether to try the lower or upper half first.
Definition float.hh:1467
Gecode::FloatNumBranch::n
FloatNum n
The middle value for branching.
Definition float.hh:1465
Gecode::FloatTraceDelta
Trace delta information for float variables.
Definition float.hh:2049
Gecode::FloatTraceDelta::FloatTraceDelta
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
Gecode::FloatTraceDelta::d
const Delta & d
Delta information.
Definition float.hh:2054
Gecode::FloatTraceDelta::min
FloatNum min(void) const
Return minimum.
Definition delta.hpp:44
Gecode::FloatTraceDelta::n
Float::FloatView n
New view.
Definition float.hh:2052
Gecode::FloatTraceDelta::max
FloatNum max(void) const
Return maximum.
Definition delta.hpp:49
Gecode::FloatValArgs
Passing float arguments.
Definition float.hh:950
Gecode::FloatValArgs::FloatValArgs
FloatValArgs(std::initializer_list< FloatVal > x)
Allocate array and copy elements from x.
Gecode::FloatValArgs::create
static FloatValArgs create(int n, FloatVal start, int inc=1)
Allocate array with n elements such that for all .
Definition array.cpp:41
Gecode::FloatValArgs::FloatValArgs
FloatValArgs(void)
Allocate empty array.
Definition array.hpp:44
Gecode::FloatValBranch
Which values to select for branching first.
Definition float.hh:1820
Gecode::FloatValBranch::select
Select select(void) const
Return selection strategy.
Definition val.hpp:49
Gecode::FloatValBranch::Select
Select
Which value selection.
Definition float.hh:1823
Gecode::FloatValBranch::SEL_SPLIT_RND
@ SEL_SPLIT_RND
Select values randomly which are not greater or not smaller than mean of largest and smallest value.
Definition float.hh:1826
Gecode::FloatValBranch::SEL_SPLIT_MIN
@ SEL_SPLIT_MIN
Select values not greater than mean of smallest and largest value.
Definition float.hh:1824
Gecode::FloatValBranch::SEL_VAL_COMMIT
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition float.hh:1827
Gecode::FloatValBranch::SEL_SPLIT_MAX
@ SEL_SPLIT_MAX
Select values greater than mean of smallest and largest value.
Definition float.hh:1825
Gecode::FloatValBranch::s
Select s
Which value to select.
Definition float.hh:1831
Gecode::FloatValBranch::FloatValBranch
FloatValBranch(Select s=SEL_SPLIT_MIN)
Initialize with selection strategy s.
Definition val.hpp:37
Gecode::FloatVal
Float value type.
Definition float.hh:334
Gecode::FloatVal::operator<<
friend std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatVal &x)
Definition val.hpp:360
Gecode::FloatVal::cos
friend FloatVal cos(const FloatVal &x)
Definition val.hpp:439
Gecode::FloatVal::singleton
bool singleton(void) const
Test whether float is a singleton.
Definition val.hpp:92
Gecode::FloatVal::exp
friend FloatVal exp(const FloatVal &x)
Definition val.hpp:413
Gecode::FloatVal::hull
friend FloatVal Float::hull(const FloatVal &x, const FloatVal &y)
Gecode::FloatVal::acos
friend FloatVal acos(const FloatVal &x)
Definition val.hpp:451
Gecode::FloatVal::operator/=
FloatVal & operator/=(const FloatNum &n)
Divide by n.
Definition val.hpp:137
Gecode::FloatVal::operator==
friend bool operator==(const FloatVal &x, const FloatVal &y)
Definition val.hpp:294
Gecode::FloatVal::P
boost::numeric::interval_lib::checking_strict< FloatNum > P
Used checking policy.
Definition float.hh:418
Gecode::FloatVal::atanh
friend FloatVal atanh(const FloatVal &x)
Definition val.hpp:480
Gecode::FloatVal::pi
static FloatVal pi(void)
Return lower bound of .
Definition val.hpp:114
Gecode::FloatVal::operator<
friend bool operator<(const FloatVal &x, const FloatVal &y)
Definition val.hpp:226
Gecode::FloatVal::operator<=
friend bool operator<=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:243
Gecode::FloatVal::cosh
friend FloatVal cosh(const FloatVal &x)
Definition val.hpp:464
Gecode::FloatVal::operator-
friend FloatVal operator-(const FloatVal &x)
Definition val.hpp:168
Gecode::FloatVal::FloatValImpType
boost::numeric::interval< FloatNum, boost::numeric::interval_lib::policies< R, P > > FloatValImpType
Implementation type for float value.
Definition float.hh:423
Gecode::FloatVal::pi_twice
static FloatVal pi_twice(void)
Return .
Definition val.hpp:119
Gecode::FloatVal::operator*
friend FloatVal operator*(const FloatVal &x, const FloatVal &y)
Definition val.hpp:200
Gecode::FloatVal::acosh
friend FloatVal acosh(const FloatVal &x)
Definition val.hpp:476
Gecode::FloatVal::x
FloatValImpType x
Implementation of float value.
Definition float.hh:425
Gecode::FloatVal::zero_in
bool zero_in(void) const
Test whether zero is included.
Definition val.hpp:100
Gecode::FloatVal::sqrt
friend FloatVal sqrt(const FloatVal &x)
Definition val.hpp:369
Gecode::FloatVal::operator-=
FloatVal & operator-=(const FloatNum &n)
Subtract by n.
Definition val.hpp:129
Gecode::FloatVal::in
bool in(FloatNum n) const
Test whether n is included.
Definition val.hpp:96
Gecode::FloatVal::pow
friend FloatVal pow(const FloatVal &x, int n)
Definition val.hpp:377
Gecode::FloatVal::abs
friend FloatVal abs(const FloatVal &x)
Definition val.hpp:365
Gecode::FloatVal::operator/
friend FloatVal operator/(const FloatVal &x, const FloatVal &y)
Definition val.hpp:213
Gecode::FloatVal::tanh
friend FloatVal tanh(const FloatVal &x)
Definition val.hpp:468
Gecode::FloatVal::operator*=
FloatVal & operator*=(const FloatNum &n)
Multiply by n.
Definition val.hpp:133
Gecode::FloatVal::max
FloatNum max(void) const
Return upper bound.
Definition val.hpp:74
Gecode::FloatVal::assign
void assign(FloatNum const &l, FloatNum const &u)
Assign lower bound l and upper bound u.
Definition val.hpp:65
Gecode::FloatVal::log
friend FloatVal log(const FloatVal &x)
Definition val.hpp:417
Gecode::FloatVal::sin
friend FloatVal sin(const FloatVal &x)
Definition val.hpp:435
Gecode::FloatVal::sqr
friend FloatVal sqr(const FloatVal &x)
Definition val.hpp:373
Gecode::FloatVal::sinh
friend FloatVal sinh(const FloatVal &x)
Definition val.hpp:460
Gecode::FloatVal::operator>=
friend bool operator>=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:277
Gecode::FloatVal::asin
friend FloatVal asin(const FloatVal &x)
Definition val.hpp:447
Gecode::FloatVal::operator+=
FloatVal & operator+=(const FloatNum &n)
Increment by n.
Definition val.hpp:125
Gecode::FloatVal::operator!=
friend bool operator!=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:317
Gecode::FloatVal::med
FloatNum med(void) const
Return median of float value.
Definition val.hpp:82
Gecode::FloatVal::operator=
FloatVal & operator=(const FloatNum &n)
Assignment operator.
Definition val.hpp:56
Gecode::FloatVal::operator>
friend bool operator>(const FloatVal &x, const FloatVal &y)
Definition val.hpp:260
Gecode::FloatVal::R
boost::numeric::interval_lib::save_state< Float::Rounding > R
Used rounding policies.
Definition float.hh:416
Gecode::FloatVal::atan
friend FloatVal atan(const FloatVal &x)
Definition val.hpp:455
Gecode::FloatVal::asinh
friend FloatVal asinh(const FloatVal &x)
Definition val.hpp:472
Gecode::FloatVal::tight
bool tight(void) const
Test whether float is tight.
Definition val.hpp:87
Gecode::FloatVal::nroot
friend FloatVal nroot(const FloatVal &x, int n)
Definition val.hpp:381
Gecode::FloatVal::size
FloatNum size(void) const
Return size of float value (distance between maximum and minimum).
Definition val.hpp:78
Gecode::FloatVal::operator+
friend FloatVal operator+(const FloatVal &x)
Definition val.hpp:164
Gecode::FloatVal::fmod
friend FloatVal fmod(const FloatVal &x, const FloatVal &y)
Definition val.hpp:422
Gecode::FloatVal::pi_half
static FloatVal pi_half(void)
Return .
Definition val.hpp:109
Gecode::FloatVal::FloatVal
FloatVal(const FloatValImpType &i)
Initialize from implementation i.
Definition val.hpp:51
Gecode::FloatVal::tan
friend FloatVal tan(const FloatVal &x)
Definition val.hpp:443
Gecode::FloatVal::FloatVal
FloatVal(void)
Default constructor.
Definition val.hpp:45
Gecode::FloatVal::min
FloatNum min(void) const
Return lower bound.
Definition val.hpp:70
Gecode::FloatVarArgs
Passing float variables.
Definition float.hh:979
Gecode::FloatVarArgs::FloatVarArgs
FloatVarArgs(void)
Allocate empty array.
Definition array.hpp:73
Gecode::FloatVarArray::FloatVarArray
FloatVarArray(void)
Default constructor (array of size 0).
Definition array.hpp:102
Gecode::FloatVarBranch
Which variable to select for branching.
Definition float.hh:1668
Gecode::FloatVarBranch::select
Select select(void) const
Return selection strategy.
Definition var.hpp:69
Gecode::FloatVarBranch::FloatVarBranch
FloatVarBranch(void)
Initialize with strategy SEL_NONE.
Definition var.hpp:37
Gecode::FloatVarBranch::expand
void expand(Home home, const FloatVarArgs &x)
Expand AFC, action, and CHB.
Definition var.hpp:74
Gecode::FloatVarBranch::Select
Select
Which variable selection.
Definition float.hh:1671
Gecode::FloatVarBranch::SEL_ACTION_SIZE_MIN
@ SEL_ACTION_SIZE_MIN
With smallest action divided by domain size.
Definition float.hh:1694
Gecode::FloatVarBranch::SEL_ACTION_SIZE_MAX
@ SEL_ACTION_SIZE_MAX
With largest action divided by domain size.
Definition float.hh:1695
Gecode::FloatVarBranch::SEL_MIN_MIN
@ SEL_MIN_MIN
With smallest min.
Definition float.hh:1684
Gecode::FloatVarBranch::SEL_AFC_SIZE_MIN
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
Definition float.hh:1692
Gecode::FloatVarBranch::SEL_MAX_MAX
@ SEL_MAX_MAX
With largest max.
Definition float.hh:1687
Gecode::FloatVarBranch::SEL_AFC_SIZE_MAX
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
Definition float.hh:1693
Gecode::FloatVarBranch::SEL_CHB_MAX
@ SEL_CHB_MAX
With highest CHB Q-score.
Definition float.hh:1683
Gecode::FloatVarBranch::SEL_DEGREE_SIZE_MIN
@ SEL_DEGREE_SIZE_MIN
With smallest degree divided by domain size.
Definition float.hh:1690
Gecode::FloatVarBranch::SEL_MIN_MAX
@ SEL_MIN_MAX
With largest min.
Definition float.hh:1685
Gecode::FloatVarBranch::SEL_CHB_SIZE_MIN
@ SEL_CHB_SIZE_MIN
With smallest CHB Q-score divided by domain size.
Definition float.hh:1696
Gecode::FloatVarBranch::SEL_NONE
@ SEL_NONE
First unassigned.
Definition float.hh:1672
Gecode::FloatVarBranch::SEL_MERIT_MIN
@ SEL_MERIT_MIN
With least merit.
Definition float.hh:1674
Gecode::FloatVarBranch::SEL_ACTION_MAX
@ SEL_ACTION_MAX
With highest action.
Definition float.hh:1681
Gecode::FloatVarBranch::SEL_CHB_MIN
@ SEL_CHB_MIN
With lowest CHB Q-score.
Definition float.hh:1682
Gecode::FloatVarBranch::SEL_DEGREE_MAX
@ SEL_DEGREE_MAX
With largest degree.
Definition float.hh:1677
Gecode::FloatVarBranch::SEL_DEGREE_SIZE_MAX
@ SEL_DEGREE_SIZE_MAX
With largest degree divided by domain size.
Definition float.hh:1691
Gecode::FloatVarBranch::SEL_DEGREE_MIN
@ SEL_DEGREE_MIN
With smallest degree.
Definition float.hh:1676
Gecode::FloatVarBranch::SEL_MERIT_MAX
@ SEL_MERIT_MAX
With highest merit.
Definition float.hh:1675
Gecode::FloatVarBranch::SEL_MAX_MIN
@ SEL_MAX_MIN
With smallest max.
Definition float.hh:1686
Gecode::FloatVarBranch::SEL_CHB_SIZE_MAX
@ SEL_CHB_SIZE_MAX
With largest CHB Q-score divided by domain size.
Definition float.hh:1697
Gecode::FloatVarBranch::SEL_RND
@ SEL_RND
Random (uniform, for tie breaking).
Definition float.hh:1673
Gecode::FloatVarBranch::SEL_AFC_MAX
@ SEL_AFC_MAX
With largest accumulated failure count.
Definition float.hh:1679
Gecode::FloatVarBranch::SEL_SIZE_MAX
@ SEL_SIZE_MAX
With largest domain size.
Definition float.hh:1689
Gecode::FloatVarBranch::SEL_AFC_MIN
@ SEL_AFC_MIN
With smallest accumulated failure count.
Definition float.hh:1678
Gecode::FloatVarBranch::SEL_ACTION_MIN
@ SEL_ACTION_MIN
With lowest action.
Definition float.hh:1680
Gecode::FloatVarBranch::SEL_SIZE_MIN
@ SEL_SIZE_MIN
With smallest domain size.
Definition float.hh:1688
Gecode::FloatVarBranch::s
Select s
Which variable to select.
Definition float.hh:1701
Gecode::FloatVar
Float variables.
Definition float.hh:870
Gecode::FloatVar::FloatVarArgs
friend class FloatVarArgs
Definition float.hh:872
Gecode::FloatVar::in
bool in(const FloatVal &n) const
Test whether n is contained in domain.
Definition float.hpp:82
Gecode::FloatVar::domain
FloatVal domain(void) const
Return domain.
Definition float.hpp:72
Gecode::FloatVar::med
FloatNum med(void) const
Return median of domain.
Definition float.hpp:63
Gecode::FloatVar::size
FloatNum size(void) const
Return size of domain (distance between maximum and minimum).
Definition float.hpp:77
Gecode::FloatVar::min
FloatNum min(void) const
Return minimum of domain.
Definition float.hpp:59
Gecode::FloatVar::FloatVar
FloatVar(void)
Default constructor.
Definition float.hpp:44
Gecode::FloatVar::val
FloatVal val(void) const
Return assigned value.
Definition float.hpp:53
Gecode::FloatVar::max
FloatNum max(void) const
Return maximum of domain.
Definition float.hpp:67
Gecode::FloatVar::FloatVarArray
friend class FloatVarArray
Definition float.hh:871
Gecode::Float::FloatTraceView
Float trace view.
Definition trace-view.hpp:37
Gecode::Float::FloatVarImp
Float variable implementation.
Definition var-imp.hpp:76
Gecode::Float::FloatView
Float view for float variables.
Definition view.hpp:52
Gecode::Float::Rounding::sin_down
FloatNum sin_down(FloatNum x)
Return lower bound of sine of x (domain: ).
Gecode::Float::Rounding::tanh_up
FloatNum tanh_up(FloatNum x)
Return upper bound of hyperbolic tangent of x (domain: ).
Gecode::Float::Rounding::acosh_up
FloatNum acosh_up(FloatNum x)
Return upper bound of hyperbolic arccosine of x (domain: ).
Gecode::Float::Rounding::~Rounding
~Rounding(void)
Destructor (restores previous rounding mode).
Definition rounding.hpp:41
Gecode::Float::Rounding::tanh_down
FloatNum tanh_down(FloatNum x)
Return lower bound of hyperbolic tangent of x (domain: ).
Gecode::Float::Rounding::sinh_up
FloatNum sinh_up(FloatNum x)
Return upper bound of hyperbolic sine of x (domain: ).
Gecode::Float::Rounding::int_up
FloatNum int_up(FloatNum x)
Return next upward-rounded integer of x (domain: ).
Gecode::Float::Rounding::sqrt_up
FloatNum sqrt_up(FloatNum x)
Return upper bound of square root of x (domain: ).
Gecode::Float::Rounding::atanh_down
FloatNum atanh_down(FloatNum x)
Return lower bound of hyperbolic arctangent of x (domain: ).
Gecode::Float::Rounding::cos_up
FloatNum cos_up(FloatNum x)
Return upper bound of cosine of x (domain: ).
Gecode::Float::Rounding::sub_up
FloatNum sub_up(FloatNum x, FloatNum y)
Return upper bound of x minus y (domain: ).
Gecode::Float::Rounding::int_down
FloatNum int_down(FloatNum x)
Return next downward-rounded integer of x (domain: ).
Gecode::Float::Rounding::median
FloatNum median(FloatNum x, FloatNum y)
Return median of x and y (domain: ).
Definition rounding.hpp:44
Gecode::Float::Rounding::add_up
FloatNum add_up(FloatNum x, FloatNum y)
Return upper bound of x plus y (domain: ).
Gecode::Float::Rounding::Rounding
Rounding(void)
Default constructor (configures full rounding mode).
Definition rounding.hpp:37
Gecode::Float::Rounding::sinh_down
FloatNum sinh_down(FloatNum x)
Return lower bound of hyperbolic sine of x (domain: ).
Gecode::Float::Rounding::tan_down
FloatNum tan_down(FloatNum x)
Return lower bound of tangent of x (domain: ).
Gecode::Float::Rounding::sqrt_down
FloatNum sqrt_down(FloatNum x)
Return lower bound of square root of x (domain: ).
Gecode::Float::Rounding::sub_down
FloatNum sub_down(FloatNum x, FloatNum y)
Return lower bound of x minus y (domain: ).
Gecode::Float::Rounding::asin_down
FloatNum asin_down(FloatNum x)
Return lower bound of arcsine of x (domain: ).
Gecode::Float::Rounding::mul_up
FloatNum mul_up(FloatNum x, FloatNum y)
Return upper bound of x times y (domain: ).
Gecode::Float::Rounding::div_up
FloatNum div_up(FloatNum x, FloatNum y)
Return upper bound of x divided y (domain: ).
Gecode::Float::Rounding::exp_down
FloatNum exp_down(FloatNum x)
Return lower bound of exponential of x (domain: ).
Gecode::Float::Rounding::div_down
FloatNum div_down(FloatNum x, FloatNum y)
Return lower bound of x divided by y (domain: ).
Gecode::Float::Rounding::mul_down
FloatNum mul_down(FloatNum x, FloatNum y)
Return lower bound of x times y (domain: ).
Gecode::Float::Rounding::asin_up
FloatNum asin_up(FloatNum x)
Return upper bound of arcsine of x (domain: ).
Gecode::Float::Rounding::acosh_down
FloatNum acosh_down(FloatNum x)
Return lower bound of hyperbolic arccosine of x (domain: ).
Gecode::Float::Rounding::atan_down
FloatNum atan_down(FloatNum x)
Return lower bound of arctangent of x (domain: ).
Gecode::Float::Rounding::cosh_down
FloatNum cosh_down(FloatNum x)
Return lower bound of hyperbolic cosine of x (domain: ).
Gecode::Float::Rounding::log_up
FloatNum log_up(FloatNum x)
Return upper bound of logarithm of x (domain: ).
Gecode::Float::Rounding::asinh_down
FloatNum asinh_down(FloatNum x)
Return lower bound of hyperbolic arcsine of x (domain: ).
Gecode::Float::Rounding::sin_up
FloatNum sin_up(FloatNum x)
Return upper bound of sine of x (domain: ).
Gecode::Float::Rounding::acos_up
FloatNum acos_up(FloatNum x)
Return upper bound of arccossine of x (domain: ).
Gecode::Float::Rounding::cosh_up
FloatNum cosh_up(FloatNum x)
Return upper bound of hyperbolic cosine of x (domain: ).
Gecode::Float::Rounding::exp_up
FloatNum exp_up(FloatNum x)
Return upper bound of exponential of x (domain: ).
Gecode::Float::Rounding::tan_up
FloatNum tan_up(FloatNum x)
Return upper bound of tangent of x (domain: ).
Gecode::Float::Rounding::acos_down
FloatNum acos_down(FloatNum x)
Return lower bound of arccosine of x (domain: ).
Gecode::Float::Rounding::atanh_up
FloatNum atanh_up(FloatNum x)
Return upper bound of hyperbolic arctangent of x (domain: ).
Gecode::Float::Rounding::log_down
FloatNum log_down(FloatNum x)
Return lower bound of logarithm of x (domain: ).
Gecode::Float::Rounding::atan_up
FloatNum atan_up(FloatNum x)
Return upper bound of arctangent of x (domain: ).
Gecode::Float::Rounding::cos_down
FloatNum cos_down(FloatNum x)
Return lower bound of cosine of x (domain: ).
Gecode::Float::Rounding::asinh_up
FloatNum asinh_up(FloatNum x)
Return upper bound of hyperbolic arcsine of x (domain: ).
Gecode::Float::Rounding::add_down
FloatNum add_down(FloatNum x, FloatNum y)
Return lower bound of x plus y (domain: ).
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::IntVar
Integer variables.
Definition int.hh:371
Gecode::Reify
Reification specification.
Definition int.hh:876
Gecode::Rnd
Random number generator.
Definition rnd.hpp:42
Gecode::SharedArray
Shared array with arbitrary number of elements.
Definition shared-array.hpp:53
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::StdFloatTracer::def
static StdFloatTracer def
Default tracer (printing to std::cerr).
Definition float.hh:2113
Gecode::StdFloatTracer::StdFloatTracer
StdFloatTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0.
Definition tracer.cpp:39
Gecode::StdFloatTracer::fail
virtual void fail(const Space &home, const FloatTraceRecorder &t)
Print failure information.
Definition tracer.cpp:81
Gecode::StdFloatTracer::fix
virtual void fix(const Space &home, const FloatTraceRecorder &t)
Print fixpoint information.
Definition tracer.cpp:63
Gecode::StdFloatTracer::os
std::ostream & os
Output stream to use.
Definition float.hh:2097
Gecode::StdFloatTracer::done
virtual void done(const Space &home, const FloatTraceRecorder &t)
Print that trace recorder is done.
Definition tracer.cpp:99
Gecode::StdFloatTracer::prune
virtual void prune(const Space &home, const FloatTraceRecorder &t, const ViewTraceInfo &vti, int i, FloatTraceDelta &d)
Print prune information.
Definition tracer.cpp:52
Gecode::StdFloatTracer::init
virtual void init(const Space &home, const FloatTraceRecorder &t)
Print init information.
Definition tracer.cpp:43
Gecode::TraceFilter
Trace filters.
Definition filter.hpp:133
Gecode::ValBranch< FloatVar >::ValBranch
ValBranch(void)
Definition val.hpp:72
Gecode::ValBranch< FloatVar >::r
Rnd r
Definition val.hpp:49
Gecode::VarArgArray< FloatVar >::VarArgArray
VarArgArray(void)
Definition array.hpp:1839
Gecode::VarArray
Variable arrays
Definition array.hpp:112
Gecode::VarArray< FloatVar >::n
int n
Definition array.hpp:115
Gecode::VarArray< FloatVar >::VarArray
VarArray(void)
Definition array.hpp:901
Gecode::VarBranch< FloatVar >::VarBranch
VarBranch(void)
Definition var.hpp:116
Gecode::VarImpVar< Float::FloatVarImp >::x
Float::FloatVarImp * x
Definition var.hpp:50
Gecode::VarImpVar< Float::FloatVarImp >::VarImpVar
VarImpVar(void)
Definition var.hpp:88
Gecode::ViewTraceInfo
View trace information.
Definition core.hpp:908
Gecode::ViewTraceRecorder
Propagator for recording view trace information.
Definition recorder.hpp:60
Gecode::ViewTracer
Tracer that process view trace information.
Definition tracer.hpp:51
array-traits.hpp
array.hpp
action.hpp
afc.hpp
assign.hpp
chb.hpp
traits.hpp
val.hpp
var.hpp
branch.hpp
channel.hpp
exception.hpp
limits.hpp
delta.hpp
trace-view.hpp
traits.hpp
trace.hpp
val.hpp
var-imp.hpp
view.hpp
GECODE_FLOAT_EXPORT
#define GECODE_FLOAT_EXPORT
Definition float.hh:68
int.hh
Gecode::FloatTracer
ViewTracer< Float::FloatView > FloatTracer
Tracer for float variables.
Definition float.hh:2083
Gecode::FloatTraceRecorder
ViewTraceRecorder< Float::FloatView > FloatTraceRecorder
Trace recorder for float variables.
Definition float.hh:2088
Gecode::trace
GECODE_FLOAT_EXPORT 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
Gecode::BranchTbl
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
Definition var.hpp:48
Gecode::FloatBranchVal
std::function< FloatNumBranch(const Space &home, FloatVar x, int i)> FloatBranchVal
Branch value function type for float variables.
Definition float.hh:1481
Gecode::FloatBranchMerit
std::function< double(const Space &home, FloatVar x, int i)> FloatBranchMerit
Branch merit function type for float variables.
Definition float.hh:1455
Gecode::FloatBranchFilter
std::function< bool(const Space &home, FloatVar x, int i)> FloatBranchFilter
Branch filter function type for float variables.
Definition float.hh:1442
Gecode::assign
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
Gecode::FloatBranchCommit
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:1496
Gecode::branch
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
Gecode::linear
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
Definition linear.cpp:41
Gecode::rel
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Definition rel.cpp:68
Gecode::ite
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
Definition bool.cpp:39
Gecode::FloatNum
double FloatNum
Floating point number base type.
Definition float.hh:106
Gecode::FloatRelType
FloatRelType
Relation types for floats.
Definition float.hh:1068
Gecode::FRT_EQ
@ FRT_EQ
Equality ( ).
Definition float.hh:1069
Gecode::FRT_GR
@ FRT_GR
Greater ( ).
Definition float.hh:1074
Gecode::FRT_NQ
@ FRT_NQ
Disequality ( ).
Definition float.hh:1070
Gecode::FRT_LE
@ FRT_LE
Less ( ).
Definition float.hh:1072
Gecode::FRT_LQ
@ FRT_LQ
Less or equal ( ).
Definition float.hh:1071
Gecode::FRT_GQ
@ FRT_GQ
Greater or equal ( ).
Definition float.hh:1073
Gecode::TE_INIT
@ TE_INIT
Trace init events.
Definition recorder.hpp:43
Gecode::TE_PRUNE
@ TE_PRUNE
Trace prune events.
Definition recorder.hpp:44
Gecode::TE_FIX
@ TE_FIX
Trace fixpoint events.
Definition recorder.hpp:45
Gecode::TE_FAIL
@ TE_FAIL
Trace fail events.
Definition recorder.hpp:46
Gecode::TE_DONE
@ TE_DONE
Trace done events.
Definition recorder.hpp:47
kernel.hh
Gecode::Float::Limits
Numerical limits for floating point variables.
Definition float.hh:842
Gecode::Float::Limits::max
const FloatNum max
Largest allowed float value.
Definition float.hh:844
Gecode::Float::Limits::valid
bool valid(const FloatVal &n)
Return whether float n is a valid number.
Definition limits.hpp:39
Gecode::Float::Limits::min
const FloatNum min
Smallest allowed float value.
Definition float.hh:846
Gecode::Float::Limits::check
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
Gecode::Float::subset
bool subset(const FloatVal &x, const FloatVal &y)
Definition val.hpp:490
Gecode::Float::proper_subset
bool proper_subset(const FloatVal &x, const FloatVal &y)
Definition val.hpp:494
Gecode::Float::hull
FloatVal hull(const FloatVal &x, const FloatVal &y)
Definition val.hpp:507
Gecode::Float::overlap
bool overlap(const FloatVal &x, const FloatVal &y)
Definition val.hpp:498
Gecode::Float::intersect
FloatVal intersect(const FloatVal &x, const FloatVal &y)
Definition val.hpp:503
Gecode::Float::RoundingBase
boost::numeric::interval_lib::rounded_arith_opp< FloatNum > RoundingBase
Rounding Base class (optimized version).
Definition float.hh:145
Gecode
Gecode toplevel namespace
Gecode::FLOAT_VAR_DEGREE_SIZE_MAX
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree divided by domain size.
Definition var.hpp:222
Gecode::FLOAT_VAR_DEGREE_SIZE_MIN
FloatVarBranch FLOAT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree divided by domain size.
Definition var.hpp:217
Gecode::FLOAT_VAR_RND
FloatVarBranch FLOAT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
Definition var.hpp:112
Gecode::FLOAT_VAL_SPLIT_MAX
FloatValBranch FLOAT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
Definition val.hpp:60
Gecode::operator/
FloatVal operator/(const FloatVal &x, const FloatVal &y)
Definition val.hpp:213
Gecode::FloatVarValPrint
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:1657
Gecode::operator-
FloatVal operator-(const FloatVal &x)
Definition val.hpp:168
Gecode::asinh
FloatVal asinh(const FloatVal &x)
Definition val.hpp:472
Gecode::operator<=
bool operator<=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:243
Gecode::FLOAT_VAR_AFC_MIN
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
Gecode::sin
void sin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition trigonometric.cpp:52
Gecode::pi_upper
FloatNum pi_upper(void)
Return upper bound of .
Definition num.hpp:49
Gecode::operator+
FloatVal operator+(const FloatVal &x)
Definition val.hpp:164
Gecode::FLOAT_VAR_SIZE_MAX
FloatVarBranch FLOAT_VAR_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest domain size.
Definition var.hpp:212
Gecode::pi_lower
FloatNum pi_lower(void)
Return lower bound of .
Definition num.hpp:45
Gecode::pi_half_lower
FloatNum pi_half_lower(void)
Return lower bound of .
Definition num.hpp:37
Gecode::channel
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition channel.cpp:41
Gecode::FLOAT_VAR_MAX_MAX
FloatVarBranch FLOAT_VAR_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest max.
Definition var.hpp:202
Gecode::sqr
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:95
Gecode::FLOAT_VAL_SPLIT_RND
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
Gecode::FLOAT_VAR_AFC_SIZE_MIN
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
Gecode::FLOAT_VAR_CHB_SIZE_MAX
FloatVarBranch FLOAT_VAR_CHB_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score divided by domain size.
Definition var.hpp:277
Gecode::operator<<
Archive & operator<<(Archive &e, FloatNumBranch nl)
Definition val-sel.hpp:39
Gecode::pi_twice_lower
FloatNum pi_twice_lower(void)
Return lower bound of .
Definition num.hpp:53
Gecode::cos
void cos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition trigonometric.cpp:66
Gecode::min
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:67
Gecode::pi_half_upper
FloatNum pi_half_upper(void)
Return upper bound of .
Definition num.hpp:41
Gecode::dom
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition dom.cpp:40
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::operator<
bool operator<(const FloatVal &x, const FloatVal &y)
Definition val.hpp:226
Gecode::mult
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:88
Gecode::FLOAT_VAR_CHB_MIN
FloatVarBranch FLOAT_VAR_CHB_MIN(BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
Definition var.hpp:167
Gecode::sqrt
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:102
Gecode::FLOAT_VAR_CHB_SIZE_MIN
FloatVarBranch FLOAT_VAR_CHB_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest CHB Q-score divided by domain size.
Definition var.hpp:267
Gecode::pi_twice_upper
FloatNum pi_twice_upper(void)
Return upper bound of .
Definition num.hpp:57
Gecode::FLOAT_VAR_ACTION_MAX
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
Gecode::acos
void acos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition trigonometric.cpp:59
Gecode::FLOAT_VAR_CHB_MAX
FloatVarBranch FLOAT_VAR_CHB_MAX(BranchTbl tbl=nullptr)
Select variable with highest CHB Q-score.
Definition var.hpp:177
Gecode::FLOAT_ASSIGN_MAX
FloatAssign FLOAT_ASSIGN_MAX(void)
Select median value of the upper part.
Definition assign.hpp:60
Gecode::operator>
bool operator>(const FloatVal &x, const FloatVal &y)
Definition val.hpp:260
Gecode::FLOAT_VAR_MIN_MIN
FloatVarBranch FLOAT_VAR_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest min.
Definition var.hpp:187
Gecode::FLOAT_VAL
FloatValBranch FLOAT_VAL(FloatBranchVal v, FloatBranchCommit c=nullptr)
Definition val.hpp:70
Gecode::log
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition transcendental.cpp:53
Gecode::FLOAT_VAR_MAX_MIN
FloatVarBranch FLOAT_VAR_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest max.
Definition var.hpp:197
Gecode::FLOAT_VAR_ACTION_MIN
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
Gecode::operator>=
bool operator>=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:277
Gecode::relax
GECODE_FLOAT_EXPORT void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
Definition relax.cpp:57
Gecode::exp
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition transcendental.cpp:45
Gecode::atan
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition trigonometric.cpp:73
Gecode::FLOAT_VAR_NONE
FloatVarBranch FLOAT_VAR_NONE(void)
Select first unassigned variable.
Definition var.hpp:97
Gecode::wait
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
Definition exec.cpp:39
Gecode::max
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:49
Gecode::FLOAT_VAR_DEGREE_MAX
FloatVarBranch FLOAT_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
Definition var.hpp:122
Gecode::fmod
FloatVal fmod(const FloatVal &x, const FloatVal &y)
Definition val.hpp:422
Gecode::sinh
FloatVal sinh(const FloatVal &x)
Definition val.hpp:460
Gecode::acosh
FloatVal acosh(const FloatVal &x)
Definition val.hpp:476
Gecode::FLOAT_VAR_ACTION_SIZE_MAX
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
Gecode::tanh
FloatVal tanh(const FloatVal &x)
Definition val.hpp:468
Gecode::FLOAT_VAR_MIN_MAX
FloatVarBranch FLOAT_VAR_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest min.
Definition var.hpp:192
Gecode::asin
void asin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition trigonometric.cpp:45
Gecode::FLOAT_ASSIGN_RND
FloatAssign FLOAT_ASSIGN_RND(Rnd r)
Select median value of a randomly chosen part.
Definition assign.hpp:65
Gecode::pow
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Definition arithmetic.cpp:109
Gecode::atanh
FloatVal atanh(const FloatVal &x)
Definition val.hpp:480
Gecode::operator*
FloatVal operator*(const FloatVal &x, const FloatVal &y)
Definition val.hpp:200
Gecode::FLOAT_VAR_AFC_SIZE_MAX
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
Gecode::FLOAT_VAR_MERIT_MIN
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
Gecode::cosh
FloatVal cosh(const FloatVal &x)
Definition val.hpp:464
Gecode::FLOAT_VAR_DEGREE_MIN
FloatVarBranch FLOAT_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
Definition var.hpp:117
Gecode::nroot
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Definition arithmetic.cpp:118
Gecode::operator==
bool operator==(const FloatVal &x, const FloatVal &y)
Definition val.hpp:294
Gecode::FLOAT_VAL_SPLIT_MIN
FloatValBranch FLOAT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
Definition val.hpp:55
Gecode::operator!=
bool operator!=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:317
Gecode::FLOAT_VAR_SIZE_MIN
FloatVarBranch FLOAT_VAR_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest domain size.
Definition var.hpp:207
Gecode::FLOAT_VAR_AFC_MAX
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
Gecode::FLOAT_ASSIGN_MIN
FloatAssign FLOAT_ASSIGN_MIN(void)
Select median value of the lower part.
Definition assign.hpp:55
Gecode::FLOAT_ASSIGN
FloatAssign FLOAT_ASSIGN(FloatBranchVal v, FloatBranchCommit c=nullptr)
Definition assign.hpp:70
Gecode::FLOAT_VAR_ACTION_SIZE_MIN
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
Gecode::tan
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition trigonometric.cpp:80
Gecode::FLOAT_VAR_MERIT_MAX
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
nextafter.hpp
num.hpp
rounding.hpp