Generated on Sat Feb 7 2015 02:01:40 for Gecode by doxygen 1.8.9.1

Float variables. More...

#include <float.hh>

Related Functions

(Note that these are not member functions.)

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const FloatVar &x)
 Print float variable x. More...
 

Constructors and initialization

 FloatVar (void)
 Default constructor. More...
 
 FloatVar (const FloatVar &y)
 Initialize from float variable y. More...
 
 FloatVar (const Float::FloatView &y)
 Initialize from float view y. More...
 
 FloatVar (Space &home, FloatNum min, FloatNum max)
 Initialize variable with range domain. More...
 

Value access

FloatVal domain (void) const
 Return domain. More...
 
FloatNum min (void) const
 Return minimum of domain. More...
 
FloatNum max (void) const
 Return maximum of domain. More...
 
FloatNum med (void) const
 Return median of domain. More...
 
FloatNum size (void) const
 Return size of domain (distance between maximum and minimum) More...
 
FloatVal val (void) const
 Return assigned value. More...
 

Domain tests

bool in (const FloatVal &n) const
 Test whether n is contained in domain. More...
 

Additional Inherited Members

- Public Types inherited from Gecode::VarImpVar< Float::FloatVarImp >
typedef Float::FloatVarImp VarImpType
 The variable implementation type corresponding to the variable. More...
 
- Public Member Functions inherited from Gecode::VarImpVar< Float::FloatVarImp >
Float::FloatVarImpvarimp (void) const
 Return variable implementation of variable. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators and advisors) More...
 
double afc (const Space &home) const
 Return accumulated failure count. More...
 
bool assigned (void) const
 Test whether view is assigned. More...
 
void update (Space &home, bool share, VarImpVar< Float::FloatVarImp > &y)
 Update this variable to be a clone of variable y. More...
 
bool same (const VarImpVar< Float::FloatVarImp > &y) const
 Test whether variable is the same as y. More...
 
bool before (const VarImpVar< Float::FloatVarImp > &y) const
 Test whether variable comes before y (arbitrary order) More...
 
- Protected Member Functions inherited from Gecode::VarImpVar< Float::FloatVarImp >
 VarImpVar (void)
 Default constructor. More...
 
 VarImpVar (Float::FloatVarImp *y)
 Initialize with variable implementation y. More...
 
- Protected Attributes inherited from Gecode::VarImpVar< Float::FloatVarImp >
Float::FloatVarImpx
 Pointer to variable implementation. More...
 

Detailed Description

Float variables.

Definition at line 857 of file float.hh.

Constructor & Destructor Documentation

Gecode::FloatVar::FloatVar ( void  )
inline

Default constructor.

Definition at line 48 of file float.hpp.

Gecode::FloatVar::FloatVar ( const FloatVar y)
inline

Initialize from float variable y.

Definition at line 50 of file float.hpp.

Gecode::FloatVar::FloatVar ( const Float::FloatView y)
inline

Initialize from float view y.

Definition at line 53 of file float.hpp.

Gecode::FloatVar::FloatVar ( Space home,
FloatNum  min,
FloatNum  max 
)

Initialize variable with range domain.

The variable is created with a domain ranging from min to max. The following exceptions might be thrown:

Definition at line 44 of file float.cpp.

Member Function Documentation

FloatVal Gecode::FloatVar::domain ( void  ) const
inline

Return domain.

Definition at line 76 of file float.hpp.

FloatNum Gecode::FloatVar::min ( void  ) const
inline

Return minimum of domain.

Definition at line 63 of file float.hpp.

FloatNum Gecode::FloatVar::max ( void  ) const
inline

Return maximum of domain.

Definition at line 71 of file float.hpp.

FloatNum Gecode::FloatVar::med ( void  ) const
inline

Return median of domain.

Definition at line 67 of file float.hpp.

FloatNum Gecode::FloatVar::size ( void  ) const
inline

Return size of domain (distance between maximum and minimum)

Definition at line 81 of file float.hpp.

FloatVal Gecode::FloatVar::val ( void  ) const
inline

Return assigned value.

Throws an exception of type Float::ValOfUnassignedVar if variable is not yet assigned.

Definition at line 57 of file float.hpp.

bool Gecode::FloatVar::in ( const FloatVal n) const
inline

Test whether n is contained in domain.

Definition at line 86 of file float.hpp.

Friends And Related Function Documentation

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  os,
const FloatVar x 
)
related

Print float variable x.

Definition at line 44 of file print.hpp.


The documentation for this class was generated from the following files: