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 IntScaleView &x) |
| Print integer-precision integer scale view.
|
template<class Char , class Traits > |
std::basic_ostream< Char,
Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const DoubleScaleView &x) |
| Print double-precision integer scale view.
|
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)
|
Additional Inherited Members |
typedef IntView::VarImpType | VarImpType |
| The variable implementation type belonging to the View.
|
typedef IntView::VarType | VarType |
| The variable type belonging to the View.
|
VarImpType * | varimp (void) const |
| Return variable implementation of view.
|
IntView | 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 (plus degree)
|
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) |
| 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) |
| Cancel subscription of advisor a.
|
void | update (Space &home, bool share, DerivedView< IntView > &y) |
| Update this view to be a clone of view y.
|
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 ModEvent | modevent (const Delta &d) |
| Return modification event.
|
| DerivedView (void) |
| Default constructor.
|
| DerivedView (const IntView &y) |
| Initialize with view y.
|
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.