45 namespace Gecode {
namespace Float {
222 : perform_copy(home,share);
227 FloatVarImp::perform_copy(
Space& home,
bool share) {
FloatNum min(void) const
Return minimum of domain.
bool assigned(void) const
Test whether variable is assigned.
bool subset(const FloatVal &x, const FloatVal &y)
#define GECODE_ASSUME(p)
Assert certain property.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc.
FloatVal dom
Domain information.
bool zero_in(void) const
Test whether 0 is contained in domain.
bool overlap(const FloatVal &x, const FloatVal &y)
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
int ModEvent
Type for modification events.
Base-class for propagators.
const Gecode::ModEvent ME_FLOAT_FAILED
Domain operation has resulted in failure.
static ModEventDelta med(ModEvent me)
Translate modification event me into modification event delta.
const Gecode::ModEvent ME_FLOAT_VAL
Domain operation has resulted in a value (assigned variable)
void cancel(Space &home)
Cancel all subscriptions when variable implementation is assigned.
FloatVarImp(Space &home, bool share, FloatVarImp &x)
Constructor for cloning x.
bool tight(void) const
Test whether float is tight.
FloatNum size(void) const
Return width of domain (distance between maximum and minimum)
int p
Number of positive literals for node type.
bool copied(void) const
Is variable already copied.
FloatNum med(void) const
Return median of float value.
int n
Number of negative literals for node type.
FloatNum med(void) const
Return median of domain (closest representation)
static ModEvent me(const ModEventDelta &med)
Project modification event for this variable type from med.
FloatVal intersect(const FloatVal &x, const FloatVal &y)
bool in(FloatNum n) const
Test whether n is contained in domain.
Float variable implementation.
int PropCond
Type for propagation conditions.
Float delta information for advisors.
FloatVarImp * copy(Space &home, bool share)
Return copy of this variable.
FloatVal val(void) const
Return value of domain (only if assigned)
ModEvent eq(Space &home, FloatNum n)
Restrict domain values to be equal to n.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
FloatVal domain(void) const
Return domain.
bool in(FloatNum n) const
Test whether n is included.
bool zero_in(void) const
Test whether zero is included.
const Gecode::ModEvent ME_FLOAT_NONE
Domain operation has not changed domain.
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 informatio...
FloatNum size(void) const
Return size of float value (distance between maximum and minimum)
ModEvent gq(Space &home, FloatNum n)
Restrict domain values to be greater or equal than n.
Gecode toplevel namespace
FloatNum max(void) const
Return maximum of domain.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
const Gecode::ModEvent ME_FLOAT_BND
Domain operation has changed the minimum or maximum of the domain.
Base-class for Float-variable implementations.
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
friend FloatVal max(const FloatVal &x, const FloatVal &y)
int ModEventDelta
Modification event deltas.
friend FloatVal min(const FloatVal &x, const FloatVal &y)
double FloatNum
Floating point number base type.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
VarImp * forward(void) const
Use forward pointer if variable already copied.
ModEvent lq(Space &home, FloatNum n)
Restrict domain values to be less or equal than n.