Generated on Thu Apr 11 13:59:52 2019 for Gecode by doxygen 1.6.3

Gecode::Float::ScaleView Class Reference
[Float views]

Scale float view. More...

#include <view.hpp>

List of all members.

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 $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 (arbitray order).

View-dependent propagator support



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

View comparison



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.

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 395 of file view.hpp.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 43 of file scale.hpp.

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

Initialize as $b\cdot y$.

Definition at line 45 of file scale.hpp.


Member Function Documentation

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

Return domain.

Definition at line 58 of file scale.hpp.

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

Return scale factor of scale view.

Definition at line 54 of file scale.hpp.

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

Return minimum of domain.

Definition at line 62 of file scale.hpp.

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

Return maximum of domain.

Definition at line 66 of file scale.hpp.

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

Return median of domain (closest representation).

Definition at line 70 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 74 of file scale.hpp.

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

Return size of domain (distance between maximum and minimum).

Definition at line 79 of file scale.hpp.

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

Test whether 0 is contained in domain.

Definition at line 89 of file scale.hpp.

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

Test whether n is contained in domain.

Definition at line 93 of file scale.hpp.

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

Test whether n is contained in domain.

Definition at line 97 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 107 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 112 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 117 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 123 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 128 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 133 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 139 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 144 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 149 of file scale.hpp.

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

Return minimum value just pruned.

Definition at line 160 of file scale.hpp.

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

Return maximum value just pruned.

Definition at line 164 of file scale.hpp.

ModEventDelta Gecode::Float::ScaleView::med ( ModEvent  me  )  [inline, static]

Translate modification event me to modification event delta for view.

Reimplemented from Gecode::DerivedView< FloatView >.

Definition at line 169 of file scale.hpp.

void Gecode::Float::ScaleView::update ( Space home,
ScaleView y 
) [inline]

Definition at line 179 of file scale.hpp.

bool Gecode::Float::ScaleView::operator< ( const ScaleView y  )  const [inline]

Whether this view comes before view y (arbitray order).

Definition at line 189 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 76 of file print.hpp.

bool operator== ( const ScaleView x,
const ScaleView y 
) [related]

Test whether views x and y are the same.

Definition at line 200 of file scale.hpp.

bool operator!= ( const ScaleView x,
const ScaleView y 
) [related]

Test whether views x and y are not the same.

Definition at line 204 of file scale.hpp.


Member Data Documentation

Scale factor.

Definition at line 399 of file view.hpp.


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