Gecode::Int::ScaleView< Val, UnsVal > Class Template Reference
[Integer views]
Scale integer view (template).
More...
#include <view.hpp>
List of all members.
Protected Attributes |
int | a |
| Scale factor.
|
Support functions for division |
|
Val | floor_div (double y) const |
| Return .
|
Val | ceil_div (double y) const |
| Return .
|
Val | exact_div (double y, bool &exact) const |
| Return and set exact to true if y is multiple of a.
|
int | floor_div (int y) const |
| Return .
|
int | ceil_div (int y) const |
| Return .
|
int | exact_div (int y, bool &exact) const |
| Return and set exact to true if y is multiple of a.
|
Constructors and initialization |
|
| ScaleView (void) |
| Default constructor.
|
| ScaleView (int b, const IntView &y) |
| Initialize as .
|
Value access |
|
int | scale (void) const |
| Return scale factor of scale view.
|
Val | min (void) const |
| Return minimum of domain.
|
Val | max (void) const |
| Return maximum of domain.
|
Val | med (void) const |
| Return median of domain (greatest element not greater than the median).
|
Val | val (void) const |
| Return assigned value (only if assigned).
|
UnsVal | size (void) const |
| Return size (cardinality) of domain.
|
UnsVal | width (void) const |
| Return width of domain (distance between maximum and minimum).
|
UnsVal | regret_min (void) const |
| Return regret of domain minimum (distance to next larger value).
|
UnsVal | regret_max (void) const |
| Return regret of domain maximum (distance to next smaller value).
|
Domain tests |
|
bool | range (void) const |
| Test whether domain is a range.
|
bool | in (Val n) const |
| Test whether n is contained in domain.
|
Domain update by value |
|
ModEvent | lq (Space &home, Val n) |
| Restrict domain values to be less or equal than n.
|
ModEvent | le (Space &home, Val n) |
| Restrict domain values to be less than n.
|
ModEvent | gq (Space &home, Val n) |
| Restrict domain values to be greater or equal than n.
|
ModEvent | gr (Space &home, Val n) |
| Restrict domain values to be greater than n.
|
ModEvent | nq (Space &home, Val n) |
| Restrict domain values to be different from n.
|
ModEvent | eq (Space &home, Val n) |
| Restrict domain values to be equal to n.
|
Delta information for advisors |
|
Val | min (const Delta &d) const |
| Return minimum value just pruned.
|
Val | max (const Delta &d) const |
| Return maximum value just pruned.
|
bool | any (const Delta &d) const |
| Test whether arbitrary values got pruned.
|
Cloning |
|
void | update (Space &home, bool share, ScaleView< Val, UnsVal > &y) |
| Update this view to be a clone of view y.
|
View-dependent propagator support |
|
static ModEventDelta | med (ModEvent me) |
| Translate modification event me to modification event delta for view.
|
Detailed Description
template<class Val, class UnsVal>
class Gecode::Int::ScaleView< Val, UnsVal >
Scale integer view (template).
A scale integer view
for an integer view
and a non-negative integer
provides operations such that
behaves as
.
The precision of a scale integer view is defined by the value types Val and UnsVal. Val can be either int
or double
where UnsVal must be the unsigned variant of Val (that is, if Val is int
, then UnsVal must be unsigned
int
; if Val is double
, then UnsVal must be double
as well). The range which is allowed for the two types is defined by the values in Gecode::Limits.
Note that scale integer views currently do not provide operations for updating domains by range iterators.
The template is not to be used directly (as it is very clumsy). Use the following instead:
- IntScaleView for scale views with integer precision
- DoubleScaleView for scale views with double precision
Definition at line 668 of file view.hpp.
Constructor & Destructor Documentation
template<class Val , class UnsVal >
Default constructor.
Definition at line 101 of file scale.hpp.
template<class Val , class UnsVal >
Member Function Documentation
template<class Val , class UnsVal >
template<class Val , class UnsVal >
template<class Val , class UnsVal >
Return
and set exact to true if y is multiple of a.
Definition at line 58 of file scale.hpp.
template<class Val, class UnsVal>
Return
.
template<class Val, class UnsVal>
Return
.
template<class Val, class UnsVal>
Return
and set exact to true if y is multiple of a.
template<class Val , class UnsVal >
Return scale factor of scale view.
Definition at line 115 of file scale.hpp.
template<class Val , class UnsVal >
Return minimum of domain.
Definition at line 120 of file scale.hpp.
template<class Val , class UnsVal >
Return maximum of domain.
Definition at line 126 of file scale.hpp.
template<class Val , class UnsVal >
Return median of domain (greatest element not greater than the median).
Definition at line 132 of file scale.hpp.
template<class Val , class UnsVal >
Return assigned value (only if assigned).
Definition at line 138 of file scale.hpp.
template<class Val , class UnsVal >
Return size (cardinality) of domain.
Definition at line 144 of file scale.hpp.
template<class Val , class UnsVal >
Return width of domain (distance between maximum and minimum).
Definition at line 150 of file scale.hpp.
template<class Val , class UnsVal >
Return regret of domain minimum (distance to next larger value).
Definition at line 156 of file scale.hpp.
template<class Val , class UnsVal >
Return regret of domain maximum (distance to next smaller value).
Definition at line 162 of file scale.hpp.
template<class Val , class UnsVal >
template<class Val , class UnsVal >
Test whether n is contained in domain.
Definition at line 178 of file scale.hpp.
template<class Val , class UnsVal >
Restrict domain values to be less or equal than n.
Definition at line 193 of file scale.hpp.
template<class Val , class UnsVal >
Restrict domain values to be less than n.
Definition at line 199 of file scale.hpp.
template<class Val , class UnsVal >
Restrict domain values to be greater or equal than n.
Definition at line 205 of file scale.hpp.
template<class Val , class UnsVal >
Restrict domain values to be greater than n.
Definition at line 210 of file scale.hpp.
template<class Val , class UnsVal >
Restrict domain values to be different from n.
Definition at line 216 of file scale.hpp.
template<class Val , class UnsVal >
Restrict domain values to be equal to n.
Definition at line 224 of file scale.hpp.
template<class Val , class UnsVal >
template<class Val , class UnsVal >
Return minimum value just pruned.
Definition at line 249 of file scale.hpp.
template<class Val , class UnsVal >
Return maximum value just pruned.
Definition at line 254 of file scale.hpp.
template<class Val , class UnsVal >
Test whether arbitrary values got pruned.
Definition at line 259 of file scale.hpp.
template<class Val , class UnsVal >
Update this view to be a clone of view y.
Definition at line 271 of file scale.hpp.
Member Data Documentation
template<class Val, class UnsVal>
The documentation for this class was generated from the following files: