Generated on Tue Apr 18 10:23:28 2017 for Gecode by doxygen 1.6.3

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

OffsetView float view. More...

#include <view.hpp>

List of all members.

Protected Attributes

FloatNum c
 Offset.

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 OffsetView &x)
 Print float offset view.

Constructors and initialization



 OffsetView (void)
 Default constructor.
 OffsetView (const FloatView &y, FloatNum c)
 Initialize with float view y and an offset c.

Value access



FloatNum offset (void) const
 Return offset.
void offset (FloatNum n)
 Change offset to be n.
FloatVal domain (void) const
 Return domain.
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, bool share, OffsetView &y)

View-dependent propagator support



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

Detailed Description

OffsetView float view.

An offset float view $o$ for an float view $x$ and an float $c$ provides operations such that $o$ behaves as $x+c$.

Definition at line 260 of file view.hpp.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 47 of file offset.hpp.

Gecode::Float::OffsetView::OffsetView ( const FloatView y,
FloatNum  c 
) [inline, explicit]

Initialize with float view y and an offset c.

Definition at line 49 of file offset.hpp.


Member Function Documentation

FloatNum Gecode::Float::OffsetView::offset ( void   )  const [inline]

Return offset.

Definition at line 58 of file offset.hpp.

void Gecode::Float::OffsetView::offset ( FloatNum  n  )  [inline]

Change offset to be n.

Definition at line 62 of file offset.hpp.

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

Return domain.

Definition at line 66 of file offset.hpp.

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

Return minimum of domain.

Definition at line 70 of file offset.hpp.

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

Return maximum of domain.

Definition at line 74 of file offset.hpp.

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

Return median of domain (closest representation).

Definition at line 78 of file offset.hpp.

FloatVal Gecode::Float::OffsetView::val ( void   )  const [inline]

Return assigned value.

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

Definition at line 82 of file offset.hpp.

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

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

Definition at line 87 of file offset.hpp.

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

Test whether 0 is contained in domain.

Definition at line 97 of file offset.hpp.

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

Test whether n is contained in domain.

Definition at line 101 of file offset.hpp.

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

Test whether n is contained in domain.

Definition at line 105 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::lq ( Space home,
int  n 
) [inline]

Restrict domain values to be less or equal than n.

Definition at line 115 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::lq ( Space home,
FloatNum  n 
) [inline]

Restrict domain values to be less or equal than n.

Definition at line 119 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::lq ( Space home,
FloatVal  n 
) [inline]

Restrict domain values to be less or equal than n.

Definition at line 123 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::gq ( Space home,
int  n 
) [inline]

Restrict domain values to be greater or equal than n.

Definition at line 128 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::gq ( Space home,
FloatNum  n 
) [inline]

Restrict domain values to be greater or equal than n.

Definition at line 132 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::gq ( Space home,
FloatVal  n 
) [inline]

Restrict domain values to be greater or equal than n.

Definition at line 136 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::eq ( Space home,
int  n 
) [inline]

Restrict domain values to be equal to n.

Definition at line 141 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::eq ( Space home,
FloatNum  n 
) [inline]

Restrict domain values to be equal to n.

Definition at line 145 of file offset.hpp.

ModEvent Gecode::Float::OffsetView::eq ( Space home,
const FloatVal n 
) [inline]

Restrict domain values to be equal to n.

Definition at line 149 of file offset.hpp.

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

Return minimum value just pruned.

Definition at line 159 of file offset.hpp.

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

Return maximum value just pruned.

Definition at line 163 of file offset.hpp.

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

Translate modification event me to modification event delta for view.

Reimplemented from Gecode::DerivedView< FloatView >.

Definition at line 168 of file offset.hpp.

void Gecode::Float::OffsetView::update ( Space home,
bool  share,
OffsetView y 
) [inline]

Definition at line 178 of file offset.hpp.


Friends And Related Function Documentation

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

Print float offset view.

Definition at line 74 of file print.hpp.


Member Data Documentation

Offset.

Definition at line 263 of file view.hpp.


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