Scale float view. More...
#include <view.hpp>
Protected Attributes | |
FloatVal | a |
Scale factor. | |
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 ScaleView &x) |
Print scale view. | |
Constructors and initialization | |
ScaleView (void) | |
Default constructor. | |
ScaleView (FloatVal b, const FloatView &y) | |
Initialize as ![]() | |
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. | |
View-dependent propagator support | |
static ModEventDelta | med (ModEvent me) |
Translate modification event me to modification event delta for view. | |
Cloning | |
void | update (Space &home, bool share, ScaleView &y) |
Scale float view.
A scale float view for a float view
and a non-negative float
provides operations such that
behaves as
.
Gecode::Float::ScaleView::ScaleView | ( | void | ) | [inline] |
Gecode::Float::ScaleView::ScaleView | ( | FloatVal | b, |
const FloatView & | y | ||
) | [inline] |
FloatVal Gecode::Float::ScaleView::domain | ( | void | ) | const [inline] |
FloatVal Gecode::Float::ScaleView::scale | ( | void | ) | const [inline] |
FloatNum Gecode::Float::ScaleView::min | ( | void | ) | const [inline] |
FloatNum Gecode::Float::ScaleView::max | ( | void | ) | const [inline] |
FloatNum Gecode::Float::ScaleView::med | ( | void | ) | const [inline] |
FloatVal Gecode::Float::ScaleView::val | ( | void | ) | const [inline] |
Return assigned value.
Throws an exception of type Float::ValOfUnassignedVar if variable is not yet assigned.
FloatNum Gecode::Float::ScaleView::size | ( | void | ) | const [inline] |
bool Gecode::Float::ScaleView::zero_in | ( | void | ) | const [inline] |
bool Gecode::Float::ScaleView::in | ( | FloatNum | n | ) | const [inline] |
bool Gecode::Float::ScaleView::in | ( | const FloatVal & | n | ) | const [inline] |
ModEvent Gecode::Float::ScaleView::lq | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::lq | ( | Space & | home, |
FloatNum | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::lq | ( | Space & | home, |
FloatVal | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::gq | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::gq | ( | Space & | home, |
FloatNum | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::gq | ( | Space & | home, |
FloatVal | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::eq | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::eq | ( | Space & | home, |
FloatNum | n | ||
) | [inline] |
ModEvent Gecode::Float::ScaleView::eq | ( | Space & | home, |
const FloatVal & | n | ||
) | [inline] |
FloatNum Gecode::Float::ScaleView::min | ( | const Delta & | d | ) | const [inline] |
FloatNum Gecode::Float::ScaleView::max | ( | const Delta & | d | ) | const [inline] |
ModEventDelta Gecode::Float::ScaleView::med | ( | ModEvent | me | ) | [inline, static] |
Translate modification event me to modification event delta for view.
Reimplemented from Gecode::DerivedView< FloatView >.
void Gecode::Float::ScaleView::update | ( | Space & | home, |
bool | share, | ||
ScaleView & | y | ||
) | [inline] |
std::basic_ostream< Char, Traits > & operator<< | ( | std::basic_ostream< Char, Traits > & | os, |
const ScaleView & | x | ||
) | [related] |
FloatVal Gecode::Float::ScaleView::a [protected] |