Float variable implementation.
More...
#include <gecode/float/var-imp.hpp>
|
| | FloatVarImp (Space &home, const FloatVal &d) |
| | Initialize with interval d.
|
| | FloatVarImpBase (void) |
| | Constructor for creating static instance of variable.
|
| | FloatVarImpBase (Gecode::Space &home) |
| | Constructor for creating variable.
|
| void | subscribe (Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule) |
| | Subscribe propagator p with propagation condition pc.
|
| void | subscribe (Gecode::Space &home, Gecode::Advisor &a, bool assigned, bool failed) |
| | Subscribe advisor a if assigned is false.
|
| 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.
|
| void | reschedule (Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned) |
| | Re-schedule propagator p.
|
| | VarImp (Space &home) |
| | Creation.
|
| void | subscribe (Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me, bool schedule) |
| | Subscribe propagator p with propagation condition pc.
|
| unsigned int | degree (void) const |
| | Return degree (number of subscribed propagators and advisors).
|
| double | afc (void) const |
| | Return accumulated failure count (plus degree).
|
| bool | copied (void) const |
| | Is variable already copied.
|
| VarImp * | forward (void) const |
| | Use forward pointer if variable already copied.
|
| unsigned int | bits (void) const |
| | Provide access to free bits.
|
|
| | FloatVarImp (Space &home, FloatVarImp &x) |
| | Constructor for cloning x.
|
| | FloatVarImpBase (Gecode::Space &home, FloatVarImpBase &x) |
| | Constructor for cloning x.
|
| void | cancel (Space &home) |
| | Cancel all subscriptions when variable implementation is assigned.
|
| bool | advise (Space &home, ModEvent me, Delta &d) |
| | Run advisors when variable implementation has been modified with modification event me and domain change d.
|
| ModEvent | fail (Space &home) |
| | Run advisors to be run on failure and returns ME_GEN_FAILED.
|
|
| 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).
|
|
| 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.
|
|
| static void | schedule (Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me) |
| | Schedule propagator p.
|
| static void | schedule (Space &home, Propagator &p, ModEvent me, bool force=false) |
| | Schedule propagator p with modification event me.
|
| static void | reschedule (Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me) |
| | Schedule propagator p.
|
| static ModEvent | me (const ModEventDelta &med) |
| | Project modification event for this variable type from med.
|
| static ModEventDelta | med (ModEvent me) |
| | Translate modification event me into modification event delta.
|
| static ModEvent | me_combine (ModEvent me1, ModEvent me2) |
| | Combine modifications events me1 and me2.
|
| static ModEvent | modevent (const Delta &d) |
| | Return modification event.
|
| static void * | operator new (size_t, Space &) |
| | Allocate memory from space.
|
| static void | operator delete (void *, Space &) |
| | Return memory to space.
|
| ActorLink ** | base |
| | Subscribed actors.
|
| VarImp< Gecode::Float::FloatVarImpConf > * | fwd |
| | Forwarding pointer.
|
| unsigned int | idx [pc_max+1] |
| | Indices of subscribed actors.
|
| VarImp< Gecode::Float::FloatVarImpConf > * | next |
| | During cloning, points to the next copied variable.
|
Float variable implementation.
Definition at line 76 of file var-imp.hpp.
◆ FloatVarImp() [1/2]
| Gecode::Float::FloatVarImp::FloatVarImp |
( |
Space & | home, |
|
|
FloatVarImp & | x ) |
|
inlineprotected |
Constructor for cloning x.
Definition at line 53 of file float.hpp.
◆ FloatVarImp() [2/2]
| Gecode::Float::FloatVarImp::FloatVarImp |
( |
Space & | home, |
|
|
const FloatVal & | d ) |
|
inline |
Initialize with interval d.
Definition at line 49 of file float.hpp.
◆ domain()
| FloatVal Gecode::Float::FloatVarImp::domain |
( |
void | | ) |
const |
|
inline |
Return domain.
Definition at line 63 of file float.hpp.
◆ min() [1/2]
| FloatNum Gecode::Float::FloatVarImp::min |
( |
void | | ) |
const |
|
inline |
Return minimum of domain.
Definition at line 67 of file float.hpp.
◆ max() [1/2]
| FloatNum Gecode::Float::FloatVarImp::max |
( |
void | | ) |
const |
|
inline |
Return maximum of domain.
Definition at line 71 of file float.hpp.
◆ val()
| FloatVal Gecode::Float::FloatVarImp::val |
( |
void | | ) |
const |
|
inline |
Return value of domain (only if assigned).
Definition at line 75 of file float.hpp.
◆ med() [1/2]
| FloatNum Gecode::Float::FloatVarImp::med |
( |
void | | ) |
const |
|
inline |
Return median of domain (closest representation).
Definition at line 79 of file float.hpp.
◆ size()
| 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.
◆ assigned()
| bool Gecode::Float::FloatVarImp::assigned |
( |
void | | ) |
const |
|
inline |
Test whether variable is assigned.
Definition at line 84 of file float.hpp.
◆ zero_in()
| bool Gecode::Float::FloatVarImp::zero_in |
( |
void | | ) |
const |
|
inline |
Test whether 0 is contained in domain.
Definition at line 100 of file float.hpp.
◆ in() [1/2]
| bool Gecode::Float::FloatVarImp::in |
( |
FloatNum | n | ) |
const |
|
inline |
Test whether n is contained in domain.
Definition at line 104 of file float.hpp.
◆ in() [2/2]
| 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.
◆ eq() [1/2]
Restrict domain values to be equal to n.
Definition at line 185 of file float.hpp.
◆ eq() [2/2]
Restrict domain values to be equal to n.
Definition at line 195 of file float.hpp.
◆ lq() [1/2]
Restrict domain values to be less or equal than n.
Definition at line 159 of file float.hpp.
◆ lq() [2/2]
Restrict domain values to be less or equal than n.
Definition at line 171 of file float.hpp.
◆ gq() [1/2]
Restrict domain values to be greater or equal than n.
Definition at line 133 of file float.hpp.
◆ gq() [2/2]
Restrict domain values to be greater or equal than n.
Definition at line 145 of file float.hpp.
◆ subscribe() [1/2]
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).
◆ reschedule()
Re-schedule propagator p with propagation condition pc.
◆ subscribe() [2/2]
| 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.
◆ med() [2/2]
Translate modification event me to modification event delta for view.
Definition at line 228 of file float.hpp.
◆ copy()
Return copy of this variable.
Definition at line 216 of file float.hpp.
◆ min() [2/2]
Return minimum value just pruned.
Definition at line 118 of file float.hpp.
◆ max() [2/2]
Return maximum value just pruned.
Definition at line 122 of file float.hpp.
◆ dom
| FloatVal Gecode::Float::FloatVarImp::dom |
|
protected |
The documentation for this class was generated from the following files: