Generated on Sat Feb 7 2015 02:01:42 for Gecode by doxygen 1.8.9.1
Gecode::Float::FloatVarImp Class Reference

Float variable implementation. More...

#include <var-imp.hpp>

Public Member Functions

 FloatVarImp (Space &home, const FloatVal &d)
 Initialize with interval d. More...
 
- Public Member Functions inherited from Gecode::Float::FloatVarImpBase
 FloatVarImpBase (void)
 Constructor for creating static instance of variable. More...
 
 FloatVarImpBase (Gecode::Space &home)
 Constructor for creating variable. More...
 
void subscribe (Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
 Subscribe propagator p with propagation condition pc. More...
 
void subscribe (Gecode::Space &home, Gecode::Advisor &a, bool assigned)
 Subscribe advisor a if assigned is false. More...
 
Gecode::ModEvent notify (Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
 Notify that variable implementation has been modified with modification event me and delta information d. More...
 
- Public Member Functions inherited from Gecode::VarImp< Gecode::Float::FloatVarImpConf >
 VarImp (Space &home)
 Creation. More...
 
 VarImp (void)
 Creation of static instances. More...
 
VarImpnext (void) const
 Return next copied variable. More...
 
 VarImp (Space &home, bool share, VarImp &x)
 Constructor for cloning. More...
 
bool copied (void) const
 Is variable already copied. More...
 
VarImpforward (void) const
 Use forward pointer if variable already copied. More...
 
void cancel (Space &home, Propagator &p, PropCond pc, bool assigned)
 Cancel subscription of propagator p with propagation condition pc. More...
 
void cancel (Space &home, Advisor &a, bool assigned)
 Cancel subscription of advisor a. More...
 
void subscribe (Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me, bool schedule)
 Subscribe propagator p with propagation condition pc. More...
 
void subscribe (Space &home, Advisor &a, bool assigned)
 Subscribe advisor a to variable. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators and advisors) More...
 
double afc (const Space &home) const
 Return accumulated failure count (plus degree) More...
 
unsigned int bits (void) const
 Provide access to free bits. More...
 
unsigned int & bits (void)
 Provide access to free bits. More...
 

Protected Member Functions

 FloatVarImp (Space &home, bool share, FloatVarImp &x)
 Constructor for cloning x. More...
 
- Protected Member Functions inherited from Gecode::Float::FloatVarImpBase
 FloatVarImpBase (Gecode::Space &home, bool share, FloatVarImpBase &x)
 Constructor for cloning x. More...
 
- Protected Member Functions inherited from Gecode::VarImp< Gecode::Float::FloatVarImpConf >
void cancel (Space &home)
 Cancel all subscriptions when variable implementation is assigned. More...
 
bool advise (Space &home, ModEvent me, Delta &d)
 Run advisors when variable implementation has been modified with modification event me and domain change d. More...
 
void schedule (Space &home, PropCond pc1, PropCond pc2, ModEvent me)
 Schedule subscribed propagators. More...
 

Protected Attributes

FloatVal dom
 Domain information. More...
 

Value access

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

Domain tests

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

Dependencies

void subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
 Subscribe propagator p with propagation condition pc to variable. More...
 
void cancel (Space &home, Propagator &p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc. More...
 
void subscribe (Space &home, Advisor &a)
 Subscribe advisor a to variable. More...
 
void cancel (Space &home, Advisor &a)
 Cancel subscription of advisor a. More...
 

Variable implementation-dependent propagator support

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

Cloning

FloatVarImpcopy (Space &home, bool share)
 Return copy of this variable. More...
 

Delta information for advisors

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

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::VarImp< Gecode::Float::FloatVarImpConf >
static void schedule (Space &home, Propagator &p, ModEvent me, bool force=false)
 Schedule propagator p with modification event me. More...
 
static ModEvent me (const ModEventDelta &med)
 Project modification event for this variable type from med. More...
 
static ModEventDelta med (ModEvent me)
 Translate modification event me into modification event delta. More...
 
static ModEvent me_combine (ModEvent me1, ModEvent me2)
 Combine modifications events me1 and me2. More...
 
static ModEvent modevent (const Delta &d)
 Return modification event. More...
 
static void * operator new (size_t, Space &)
 Allocate memory from space. More...
 
static void operator delete (void *, Space &)
 Return memory to space. More...
 
static void operator delete (void *)
 Needed for exceptions. More...
 
- Public Attributes inherited from Gecode::VarImp< Gecode::Float::FloatVarImpConf >
ActorLink ** base
 Subscribed actors. More...
 
VarImp< Gecode::Float::FloatVarImpConf > * fwd
 Forwarding pointer. More...
 
unsigned int idx [pc_max+1]
 Indices of subscribed actors. More...
 
VarImp< Gecode::Float::FloatVarImpConf > * next
 During cloning, points to the next copied variable. More...
 

Detailed Description

Float variable implementation.

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

Constructor & Destructor Documentation

Gecode::Float::FloatVarImp::FloatVarImp ( Space home,
bool  share,
FloatVarImp x 
)
inlineprotected

Constructor for cloning x.

Definition at line 57 of file float.hpp.

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

Initialize with interval d.

Definition at line 53 of file float.hpp.

Member Function Documentation

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

Return domain.

Definition at line 67 of file float.hpp.

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

Return minimum of domain.

Definition at line 71 of file float.hpp.

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

Return maximum of domain.

Definition at line 75 of file float.hpp.

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

Return value of domain (only if assigned)

Definition at line 79 of file float.hpp.

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

Return median of domain (closest representation)

Definition at line 83 of file float.hpp.

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

Return width of domain (distance between maximum and minimum)

Definition at line 93 of file float.hpp.

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

Test whether variable is assigned.

Definition at line 88 of file float.hpp.

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

Test whether 0 is contained in domain.

Definition at line 104 of file float.hpp.

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

Test whether n is contained in domain.

Definition at line 108 of file float.hpp.

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

Test whether n is contained in domain.

Definition at line 112 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 189 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 199 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 163 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 175 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 137 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 149 of file float.hpp.

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

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 236 of file float.hpp.

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

Cancel subscription of propagator p with propagation condition pc.

Definition at line 240 of file float.hpp.

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

Subscribe advisor a to variable.

Definition at line 245 of file float.hpp.

void Gecode::Float::FloatVarImp::cancel ( Space home,
Advisor a 
)
inline

Cancel subscription of advisor a.

Definition at line 249 of file float.hpp.

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

Translate modification event me to modification event delta for view.

Definition at line 254 of file float.hpp.

FloatVarImp * Gecode::Float::FloatVarImp::copy ( Space home,
bool  share 
)
inline

Return copy of this variable.

Definition at line 220 of file float.hpp.

FloatNum Gecode::Float::FloatVarImp::min ( const Delta d)
inlinestatic

Return minimum value just pruned.

Definition at line 122 of file float.hpp.

FloatNum Gecode::Float::FloatVarImp::max ( const Delta d)
inlinestatic

Return maximum value just pruned.

Definition at line 126 of file float.hpp.

Member Data Documentation

FloatVal Gecode::Float::FloatVarImp::dom
protected

Domain information.

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


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