
Float view for float variables. More...
#include <view.hpp>
Related Symbols | |
(Note that these are not member symbols.) | |
| template<class Char, class Traits> | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const FloatView &x) |
| Print float variable view. | |
Constructors and initialization | |
| FloatView (void) | |
| Default constructor. | |
| FloatView (const FloatVar &y) | |
| Initialize from float variable y. | |
| FloatView (FloatVarImp *y) | |
| Initialize from float variable y. | |
Value access | |
| FloatVal | domain (void) const |
| Return domain. | |
| FloatNum | min (void) const |
| Return minimum of domain. | |
| FloatNum | max (void) const |
| Return maximum of domain. | |
| FloatNum | med (void) const |
| Return median of domain (closest representation) | |
| FloatVal | val (void) const |
| Return assigned value. | |
| FloatNum | size (void) const |
| Return size of domain (distance between maximum and minimum) | |
Domain tests | |
| bool | zero_in (void) const |
| Test whether 0 is contained in domain. | |
| bool | in (FloatNum n) const |
| Test whether n is contained in domain. | |
| bool | in (const FloatVal &n) const |
| Test whether n is contained in domain. | |
Domain update by value | |
| ModEvent | lq (Space &home, int n) |
| Restrict domain values to be less or equal than n. | |
| ModEvent | lq (Space &home, FloatNum n) |
| Restrict domain values to be less or equal than n. | |
| ModEvent | lq (Space &home, FloatVal n) |
| Restrict domain values to be less or equal than n. | |
| ModEvent | gq (Space &home, int n) |
| Restrict domain values to be greater or equal than n. | |
| ModEvent | gq (Space &home, FloatNum n) |
| Restrict domain values to be greater or equal than n. | |
| ModEvent | gq (Space &home, FloatVal n) |
| Restrict domain values to be greater or equal than n. | |
| ModEvent | eq (Space &home, int n) |
| Restrict domain values to be equal to n. | |
| ModEvent | eq (Space &home, FloatNum n) |
| Restrict domain values to be equal to n. | |
| ModEvent | eq (Space &home, const FloatVal &n) |
| Restrict domain values to be equal to n. | |
Delta information for advisors | |
| FloatNum | min (const Delta &d) const |
| Return minimum value just pruned. | |
| FloatNum | max (const Delta &d) const |
| Return maximum value just pruned. | |
View-dependent propagator support | |
| static ModEventDelta | med (ModEvent me) |
| Translate modification event me to modification event delta for view. | |
Additional Inherited Members | |
Public Types inherited from Gecode::VarImpView< FloatVar > | |
| typedef FloatVar | VarType |
| The variable type corresponding to the view. | |
| typedef FloatVar::VarImpType | VarImpType |
| The variable implementation type corresponding to the view. | |
| VarImpType * | varimp (void) const |
| Return variable implementation of view. | |
| unsigned int | degree (void) const |
| Return degree (number of subscribed propagators and advisors) | |
| double | afc (void) const |
| Return accumulated failure count. | |
| bool | assigned (void) const |
| Test whether view is assigned. | |
| void | subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true) |
| Subscribe propagator p with propagation condition pc to view. | |
| void | subscribe (Space &home, Advisor &a, bool fail=false) |
| Subscribe advisor a to view. | |
| void | cancel (Space &home, Propagator &p, PropCond pc) |
| Cancel subscription of propagator p with propagation condition pc to view. | |
| void | cancel (Space &home, Advisor &a, bool fail=false) |
| Cancel subscription of advisor a. | |
| void | reschedule (Space &home, Propagator &p, PropCond pc) |
| Re-schedule propagator p with propagation condition pc. | |
| void | update (Space &home, VarImpView< FloatVar > &y) |
| Update this view to be a clone of view y. | |
| bool | operator< (const VarImpView &y) const |
| Whether this view comes before view y (arbitray order) | |
| static bool | varderived (void) |
| Return whether this view is derived from a VarImpView. | |
| static void | schedule (Space &home, Propagator &p, ModEvent me) |
| Schedule propagator p with modification event me. | |
| static ModEvent | me (const ModEventDelta &med) |
| Return modification event for view type in med. | |
| static ModEventDelta | med (ModEvent me) |
| Translate modification event me to modification event delta for view. | |
| static ModEvent | modevent (const Delta &d) |
| Return modification event. | |
Protected Member Functions inherited from Gecode::VarImpView< FloatVar > | |
| VarImpView (void) | |
| Default constructor. | |
| VarImpView (VarImpType *y) | |
| Initialize with variable implementation y. | |
| void | varimp (VarImpType *y) |
| Set variable implementation to y. | |
Protected Attributes inherited from Gecode::VarImpView< FloatVar > | |
| VarImpType * | x |
| Pointer to variable implementation. | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return assigned value.
Throws an exception of type Float::ValOfUnassignedVar if variable is not yet assigned.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|