Gecode::Float::ScaleView Class Reference
Scale float view. More...
#include <gecode/float/view.hpp>
Protected Attributes | |
| FloatVal | a |
| Scale factor. | |
| Protected Attributes inherited from Gecode::DerivedView< FloatView > | |
| FloatView | x |
| View from which this view is derived. | |
Constructors and initialization | |
| ScaleView (void) | |
| Default constructor. | |
| ScaleView (FloatVal b, const FloatView &y) | |
| Initialize as \(b\cdot y\). | |
Value access | |
| FloatVal | domain (void) const |
| Return domain. | |
| FloatVal | scale (void) const |
| Return scale factor of scale view. | |
| 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. | |
Cloning | |
| void | update (Space &home, ScaleView &y) |
Ordering | |
| bool | operator< (const ScaleView &y) const |
| Whether this view comes before view y (arbitrary order). | |
View-dependent propagator support | |
| static ModEventDelta | med (ModEvent me) |
| Translate modification event me to modification event delta for view. | |
View comparison | |
| template<class Char, class Traits> | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const ScaleView &x) |
| Print scale view. | |
| bool | operator== (const ScaleView &x, const ScaleView &y) |
| Test whether views x and y are the same. | |
| bool | operator!= (const ScaleView &x, const ScaleView &y) |
| Test whether views x and y are not the same. | |
Additional Inherited Members | |
| Public Types inherited from Gecode::DerivedView< FloatView > | |
| typedef FloatView::VarImpType | VarImpType |
| The variable implementation type belonging to the View. | |
| typedef FloatView::VarType | VarType |
| The variable type belonging to the View. | |
| VarImpType * | varimp (void) const |
| Return variable implementation of view. | |
| FloatView | base (void) const |
| Return view from which this view is derived. | |
| unsigned int | degree (void) const |
| Return degree (number of subscribed propagators). | |
| 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 | cancel (Space &home, Propagator &p, PropCond pc) |
| Cancel subscription of propagator p with propagation condition pc to view. | |
| void | reschedule (Space &home, Propagator &p, PropCond pc) |
| Re-schedule propagator p with propagation condition pc. | |
| void | update (Space &home, DerivedView< FloatView > &y) |
| Update this view to be a clone of view y. | |
| bool | operator< (const DerivedView< FloatView > &y) const |
| Whether this view comes before view y (arbitrary 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) |
| 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::DerivedView< FloatView > | |
| DerivedView (void) | |
| Default constructor. | |
Detailed Description
Scale float view.
A scale float view \(s\) for a float view \(x\) and a non-negative float \(a\) provides operations such that \(s\) behaves as \(a\cdot x\).
Constructor & Destructor Documentation
◆ ScaleView() [1/2]
|
inline |
◆ ScaleView() [2/2]
Member Function Documentation
◆ domain()
|
inline |
◆ scale()
|
inline |
◆ min() [1/2]
|
inline |
◆ max() [1/2]
|
inline |
◆ med() [1/2]
|
inline |
◆ val()
|
inline |
Return assigned value.
Throws an exception of type Float::ValOfUnassignedVar if variable is not yet assigned.
◆ size()
|
inline |
◆ zero_in()
|
inline |
◆ in() [1/2]
|
inline |
◆ in() [2/2]
|
inline |
◆ lq() [1/3]
◆ lq() [2/3]
◆ lq() [3/3]
◆ gq() [1/3]
◆ gq() [2/3]
◆ gq() [3/3]
◆ eq() [1/3]
◆ eq() [2/3]
◆ eq() [3/3]
◆ min() [2/2]
◆ max() [2/2]
◆ med() [2/2]
|
inlinestatic |
◆ update()
◆ operator<()
|
inline |
Friends And Related Symbol Documentation
◆ operator<<()
template<class Char, class Traits>
|
◆ operator==()
◆ operator!=()
Member Data Documentation
◆ a
|
protected |
The documentation for this class was generated from the following files:
