Generated on Sat Feb 7 2015 02:01:43 for Gecode by doxygen 1.8.9.1

Scale float view. More...

#include <view.hpp>

Protected Attributes

FloatVal a
 Scale factor. More...
 
- Protected Attributes inherited from Gecode::DerivedView< FloatView >
FloatView x
 View from which this view is derived. More...
 

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. More...
 

Constructors and initialization

 ScaleView (void)
 Default constructor. More...
 
 ScaleView (FloatVal b, const FloatView &y)
 Initialize as $b\cdot y$. More...
 

Value access

FloatVal domain (void) const
 Return domain. More...
 
FloatVal scale (void) const
 Return scale factor of scale view. More...
 
FloatNum min (void) const
 Return minimum of domain. More...
 
FloatNum max (void) const
 Return maximum of domain. More...
 
FloatNum med (void) const
 Return median of domain (closest representation) More...
 
FloatVal val (void) const
 Return assigned value. More...
 
FloatNum size (void) const
 Return size of domain (distance between maximum and minimum) More...
 

Domain tests

bool zero_in (void) const
 Test whether 0 is contained in domain. More...
 
bool in (FloatNum n) const
 Test whether n is contained in domain. More...
 
bool in (const FloatVal &n) const
 Test whether n is contained in domain. More...
 

Domain update by value

ModEvent lq (Space &home, int n)
 Restrict domain values to be less or equal than n. More...
 
ModEvent lq (Space &home, FloatNum n)
 Restrict domain values to be less or equal than n. More...
 
ModEvent lq (Space &home, FloatVal n)
 Restrict domain values to be less or equal than n. More...
 
ModEvent gq (Space &home, int n)
 Restrict domain values to be greater or equal than n. More...
 
ModEvent gq (Space &home, FloatNum n)
 Restrict domain values to be greater or equal than n. More...
 
ModEvent gq (Space &home, FloatVal n)
 Restrict domain values to be greater or equal than n. More...
 
ModEvent eq (Space &home, int n)
 Restrict domain values to be equal to n. More...
 
ModEvent eq (Space &home, FloatNum n)
 Restrict domain values to be equal to n. More...
 
ModEvent eq (Space &home, const FloatVal &n)
 Restrict domain values to be equal to n. More...
 

Delta information for advisors

FloatNum min (const Delta &d) const
 Return minimum value just pruned. More...
 
FloatNum max (const Delta &d) const
 Return maximum value just pruned. More...
 

View-dependent propagator support

static ModEventDelta med (ModEvent me)
 Translate modification event me to modification event delta for view. More...
 

Cloning

void update (Space &home, bool share, ScaleView &y)
 

Additional Inherited Members

- Public Types inherited from Gecode::DerivedView< FloatView >
typedef FloatView::VarImpType VarImpType
 The variable implementation type belonging to the View. More...
 
typedef FloatView::VarType VarType
 The variable type belonging to the View. More...
 
- Public Member Functions inherited from Gecode::DerivedView< FloatView >
VarImpTypevarimp (void) const
 Return variable implementation of view. More...
 
FloatView base (void) const
 Return view from which this view is derived. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators) More...
 
double afc (const Space &home) const
 Return accumulated failure count. More...
 
bool assigned (void) const
 Test whether view is assigned. More...
 
void subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
 Subscribe propagator p with propagation condition pc to view. More...
 
void subscribe (Space &home, Advisor &a)
 Subscribe advisor a to view. More...
 
void cancel (Space &home, Propagator &p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc to view. More...
 
void cancel (Space &home, Advisor &a)
 Cancel subscription of advisor a. More...
 
void update (Space &home, bool share, DerivedView< FloatView > &y)
 Update this view to be a clone of view y. More...
 
- Static Public Member Functions inherited from Gecode::DerivedView< FloatView >
static bool varderived (void)
 Return whether this view is derived from a VarImpView. More...
 
static void schedule (Space &home, Propagator &p, ModEvent me)
 Schedule propagator p with modification event me. More...
 
static ModEvent me (const ModEventDelta &med)
 Return modification event for view type in med. More...
 
static ModEventDelta med (ModEvent)
 Translate modification event me to modification event delta for view. More...
 
static ModEvent modevent (const Delta &d)
 Return modification event. More...
 
- Protected Member Functions inherited from Gecode::DerivedView< FloatView >
 DerivedView (void)
 Default constructor. More...
 
 DerivedView (const FloatView &y)
 Initialize with view y. More...
 

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$.

Definition at line 373 of file view.hpp.

Constructor & Destructor Documentation

Gecode::Float::ScaleView::ScaleView ( void  )
inline

Default constructor.

Definition at line 47 of file scale.hpp.

Gecode::Float::ScaleView::ScaleView ( FloatVal  b,
const FloatView y 
)
inline

Initialize as $b\cdot y$.

Definition at line 49 of file scale.hpp.

Member Function Documentation

FloatVal Gecode::Float::ScaleView::domain ( void  ) const
inline

Return domain.

Definition at line 62 of file scale.hpp.

FloatVal Gecode::Float::ScaleView::scale ( void  ) const
inline

Return scale factor of scale view.

Definition at line 58 of file scale.hpp.

FloatNum Gecode::Float::ScaleView::min ( void  ) const
inline

Return minimum of domain.

Definition at line 66 of file scale.hpp.

FloatNum Gecode::Float::ScaleView::max ( void  ) const
inline

Return maximum of domain.

Definition at line 70 of file scale.hpp.

FloatNum Gecode::Float::ScaleView::med ( void  ) const
inline

Return median of domain (closest representation)

Definition at line 74 of file scale.hpp.

FloatVal Gecode::Float::ScaleView::val ( void  ) const
inline

Return assigned value.

Throws an exception of type Float::ValOfUnassignedVar if variable is not yet assigned.

Definition at line 78 of file scale.hpp.

FloatNum Gecode::Float::ScaleView::size ( void  ) const
inline

Return size of domain (distance between maximum and minimum)

Definition at line 83 of file scale.hpp.

bool Gecode::Float::ScaleView::zero_in ( void  ) const
inline

Test whether 0 is contained in domain.

Definition at line 93 of file scale.hpp.

bool Gecode::Float::ScaleView::in ( FloatNum  n) const
inline

Test whether n is contained in domain.

Definition at line 97 of file scale.hpp.

bool Gecode::Float::ScaleView::in ( const FloatVal n) const
inline

Test whether n is contained in domain.

Definition at line 101 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::lq ( Space home,
int  n 
)
inline

Restrict domain values to be less or equal than n.

Definition at line 111 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::lq ( Space home,
FloatNum  n 
)
inline

Restrict domain values to be less or equal than n.

Definition at line 116 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::lq ( Space home,
FloatVal  n 
)
inline

Restrict domain values to be less or equal than n.

Definition at line 121 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::gq ( Space home,
int  n 
)
inline

Restrict domain values to be greater or equal than n.

Definition at line 127 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::gq ( Space home,
FloatNum  n 
)
inline

Restrict domain values to be greater or equal than n.

Definition at line 132 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::gq ( Space home,
FloatVal  n 
)
inline

Restrict domain values to be greater or equal than n.

Definition at line 137 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::eq ( Space home,
int  n 
)
inline

Restrict domain values to be equal to n.

Definition at line 143 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::eq ( Space home,
FloatNum  n 
)
inline

Restrict domain values to be equal to n.

Definition at line 148 of file scale.hpp.

ModEvent Gecode::Float::ScaleView::eq ( Space home,
const FloatVal n 
)
inline

Restrict domain values to be equal to n.

Definition at line 153 of file scale.hpp.

FloatNum Gecode::Float::ScaleView::min ( const Delta d) const
inline

Return minimum value just pruned.

Definition at line 164 of file scale.hpp.

FloatNum Gecode::Float::ScaleView::max ( const Delta d) const
inline

Return maximum value just pruned.

Definition at line 168 of file scale.hpp.

ModEventDelta Gecode::Float::ScaleView::med ( ModEvent  me)
inlinestatic

Translate modification event me to modification event delta for view.

Definition at line 173 of file scale.hpp.

void Gecode::Float::ScaleView::update ( Space home,
bool  share,
ScaleView y 
)
inline

Definition at line 183 of file scale.hpp.

Friends And Related Function Documentation

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  os,
const ScaleView x 
)
related

Print scale view.

Definition at line 80 of file print.hpp.

Member Data Documentation

FloatVal Gecode::Float::ScaleView::a
protected

Scale factor.

Definition at line 377 of file view.hpp.


The documentation for this class was generated from the following files: