Generated on Sun Feb 17 15:25:10 2019 for Gecode by doxygen 1.6.3

Gecode::Float::FloatVarImp Class Reference
[Other available functionality]

Float variable implementation. More...

#include <var-imp.hpp>

List of all members.

Public Member Functions

 FloatVarImp (Space &home, const FloatVal &d)
 Initialize with interval d.

Protected Member Functions

 FloatVarImp (Space &home, FloatVarImp &x)
 Constructor for cloning x.

Protected Attributes

FloatVal dom
 Domain information.

Value access



FloatVal domain (void) const
 Return domain.
FloatNum min (void) const
 Return minimum of domain.
FloatNum max (void) const
 Return maximum of domain.
FloatVal val (void) const
 Return value of domain (only if assigned).
FloatNum med (void) const
 Return median of domain (closest representation).
FloatNum size (void) const
 Return width of domain (distance between maximum and minimum).

Domain tests



bool assigned (void) const
 Test whether variable is assigned.
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 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.
ModEvent lq (Space &home, FloatNum n)
 Restrict domain values to be less or equal than n.
ModEvent lq (Space &home, const FloatVal &n)
 Restrict domain values to be less or equal than n.
ModEvent gq (Space &home, FloatNum n)
 Restrict domain values to be greater or equal than n.
ModEvent gq (Space &home, const FloatVal &n)
 Restrict domain values to be greater or equal than n.

Dependencies



void subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
 Subscribe propagator p with propagation condition pc to variable.
void reschedule (Space &home, Propagator &p, PropCond pc)
 Re-schedule propagator p with propagation condition pc.
void subscribe (Space &home, Advisor &a, bool fail)
 Subscribe advisor a to variable.

Cloning



FloatVarImpcopy (Space &home)
 Return copy of this variable.

Variable implementation-dependent propagator support



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

Delta information for advisors



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

Detailed Description

Float variable implementation.

Definition at line 76 of file var-imp.hpp.


Constructor & Destructor Documentation

Gecode::Float::FloatVarImp::FloatVarImp ( Space home,
FloatVarImp x 
) [inline, protected]

Constructor for cloning x.

Definition at line 53 of file float.hpp.

Gecode::Float::FloatVarImp::FloatVarImp ( Space home,
const FloatVal d 
) [inline]

Initialize with interval d.

Definition at line 49 of file float.hpp.


Member Function Documentation

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

Return domain.

Definition at line 63 of file float.hpp.

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

Return minimum of domain.

Definition at line 67 of file float.hpp.

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

Return maximum of domain.

Definition at line 71 of file float.hpp.

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

Return value of domain (only if assigned).

Definition at line 75 of file float.hpp.

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

Return median of domain (closest representation).

Definition at line 79 of file float.hpp.

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

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

Definition at line 89 of file float.hpp.

bool Gecode::Float::FloatVarImp::assigned ( void   )  const [inline]

Test whether variable is assigned.

Definition at line 84 of file float.hpp.

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

Test whether 0 is contained in domain.

Definition at line 100 of file float.hpp.

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

Test whether n is contained in domain.

Definition at line 104 of file float.hpp.

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

Test whether n is contained in domain.

Definition at line 108 of file float.hpp.

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

Restrict domain values to be equal to n.

Definition at line 185 of file float.hpp.

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

Restrict domain values to be equal to n.

Definition at line 195 of file float.hpp.

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

Restrict domain values to be less or equal than n.

Definition at line 159 of file float.hpp.

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

Restrict domain values to be less or equal than n.

Definition at line 171 of file float.hpp.

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

Restrict domain values to be greater or equal than n.

Definition at line 133 of file float.hpp.

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

Restrict domain values to be greater or equal than n.

Definition at line 145 of file float.hpp.

void Gecode::Float::FloatVarImp::subscribe ( Space home,
Propagator p,
PropCond  pc,
bool  schedule = true 
)

Subscribe propagator p with propagation condition pc to variable.

In case schedule is false, the propagator is just subscribed but not scheduled for execution (this must be used when creating subscriptions during propagation).

Definition at line 50 of file float.cpp.

void Gecode::Float::FloatVarImp::reschedule ( Space home,
Propagator p,
PropCond  pc 
)

Re-schedule propagator p with propagation condition pc.

Definition at line 56 of file float.cpp.

void Gecode::Float::FloatVarImp::subscribe ( Space home,
Advisor a,
bool  fail 
)

Subscribe advisor a to variable.

The advisor a is only subscribed if assigned is false.

If fail is true, the advisor a is also run when a variable operation triggers failure. This feature is undocumented.

Definition at line 61 of file float.cpp.

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

Translate modification event me to modification event delta for view.

Reimplemented from Gecode::VarImp< Gecode::Float::FloatVarImpConf >.

Definition at line 228 of file float.hpp.

FloatVarImp * Gecode::Float::FloatVarImp::copy ( Space home  )  [inline]

Return copy of this variable.

Definition at line 216 of file float.hpp.

FloatNum Gecode::Float::FloatVarImp::min ( const Delta d  )  [inline, static]

Return minimum value just pruned.

Definition at line 118 of file float.hpp.

FloatNum Gecode::Float::FloatVarImp::max ( const Delta d  )  [inline, static]

Return maximum value just pruned.

Definition at line 122 of file float.hpp.


Member Data Documentation

Domain information.

Definition at line 79 of file var-imp.hpp.


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