Go to the documentation of this file.
42 #ifndef __GECODE_TEST_FLOAT_HH__
43 #define __GECODE_TEST_FLOAT_HH__
100 int size(
void)
const;
270 bool eqv(
void)
const;
273 bool imp(
void)
const;
275 bool pmi(
void)
const;
295 Test(
const std::string& s,
int a,
317 virtual bool run(
void);
void disable(void)
Disable propagators in space and compute fixpoint (make all idle)
virtual Assignment * assignment(void) const
Create assignment.
bool testsearch
Whether to perform search test.
Gecode::FloatVal dom
Domain of variables.
virtual void operator++(void)
Move to next assignment.
Gecode::FloatNum cut(int *cutDirections)
Cut the bigger variable to an half sized interval. It returns the new size of the cut interval....
Post propagator for SetVar SetOpType SetVar y
Gecode::FloatVal * vals
The current values for the variables.
Gecode::Reify r
Reification information.
Gecode::FloatNum step
Step for next assignment.
virtual void set(int i, const Gecode::FloatVal &val)
Set assignment to value val for variable i.
Test(const std::string &s, int a, const Gecode::FloatVal &d, Gecode::FloatNum st, AssignmentType at, bool r)
Constructor.
bool operator()(void) const
Test whether iterator is done.
static MaybeType eq(Gecode::FloatVal x, Gecode::FloatVal y)
Whether x and y are equal.
virtual Gecode::FloatVal operator[](int i) const
Return value for variable i.
virtual void set(int i, const Gecode::FloatVal &val)
Set assignment to value val for variable i.
bool testfix
Whether to perform fixpoint test.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
FloatRelTypes(void)
Initialize iterator.
bool matchAssignment(const Assignment &a) const
Test whether all variables match assignment a.
Gecode::FloatVal * dsv
Iterator for each variable.
bool reified
Does the constraint also exist as reified constraint.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual Gecode::Space * copy(bool share)
Copy space during cloning.
RandomAssignment(int n, const Gecode::FloatVal &d, int a)
Initialize for a assignments for n variables and values d.
virtual bool extendAssignement(Assignment &a) const
Complete the current assignment to get a feasible one (which satisfies all constraint)....
AssignmentType
Assignment possible types.
AssignmentType assigmentType
Gives the type of assignment to use.
const FloatNum min
Smallest allowed float value.
virtual void set(int i, const Gecode::FloatVal &val)
Set assignment to value val for variable i.
bool assigned(void) const
Test whether all variables are assigned.
virtual void operator++(void)=0
Move to next assignment.
bool reified
Whether the test is for a reified propagator.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)=0
Post constraint.
FloatRelType
Relation types for floats.
Gecode::FloatVal * dsv
Iterator for each variable.
ExtAssignment(int n, const Gecode::FloatVal &d, Gecode::FloatNum s, const Test *pb)
Initialize assignments for n variables and values d with step s.
bool failed(void)
Compute a fixpoint and check for failure.
Assignment(int n0, const Gecode::FloatVal &d0)
Initialize assignments for n0 variables and values d0.
virtual ~Assignment(void)
Destructor.
virtual bool run(void)
Perform test.
Test * test
The test currently run.
Gecode::FloatNum randval(void)
Gecode::FloatRelType frt(void) const
Return current relation type.
bool subsumed(const TestSpace &ts) const
Test if ts is subsumed or not (i.e. if there is no more propagator unless the assignment is an extend...
Base class for all tests to be run
Gecode::FloatVarArray x
Variables to be tested.
unsigned int propagators(void)
Return the number of propagators.
Generate all assignments.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatView &x)
Print float variable view.
Node * x
Pointer to corresponding Boolean expression node.
void reset(void)
Reset iterator.
Gecode::FloatVal d
Initial domain.
virtual void set(int i, const Gecode::FloatVal &val)=0
Set assignment to value val for variable i.
Reification specification.
TestSpace(int n, Gecode::FloatVal &d, Gecode::FloatNum s, Test *t)
Create test space.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
int rms
Which reification modes are supported.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
bool flip(void)
Flip a coin and return true or false randomly.
virtual Gecode::FloatVal operator[](int i) const
Return value for variable i.
double FloatNum
Floating point number base type.
void operator++(void)
Increment to next relation type.
void rel(int i, Gecode::FloatRelType frt, Gecode::FloatVal n)
Perform integer tell operation on x[i].
int arity
Number of variables.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
const Test * curPb
Current problem used to complete assignment.
Gecode::FloatVal d
Domain for each variable.
Gecode::FloatNum step
Step for going to next solution.
virtual ~CpltAssignment(void)
Destructor.
virtual void operator++(void)
Move to next assignment.
void bound(void)
Assing a random variable to a random bound.
virtual MaybeType solution(const Assignment &) const =0
Check for solution.
Generate random selection of assignments.
virtual bool ignore(const Assignment &a) const
Whether to ignore assignment for reification.
static MaybeType cmp(Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y)
Compare x and y with respect to r.
Gecode::FloatNum step
Step for going to next solution.
Space for executing tests.
MaybeType operator&(MaybeType a, MaybeType b)
Three-valued conjunction of MaybeType.
ReifyMode
Mode for reification.
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
virtual ~ExtAssignment(void)
Destructor.
virtual void operator++(void)
Move to next assignment.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
MaybeType
Type for comparisons and solutions.
void enable(void)
Enable propagators in space.
int size(void) const
Return number of variables.
void post(void)
Post propagator.
Generate all assignments except the last variable and complete it to get a solution.
Base class for assignments
Iterator for float relation types.
virtual void dropUntil(const Assignment &a)
Add constraints to skip solutions to the a assignment.
Gecode::FloatNum step
Step for next assignment.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
virtual Gecode::FloatVal operator[](int i) const =0
Return value for variable i.
CpltAssignment(int n, const Gecode::FloatVal &d, Gecode::FloatNum s)
Initialize assignments for n variables and values d with step s.
int n
Number of negative literals for node type.
bool imp(void) const
Test whether implication as reification mode is supported.
void assign(const Assignment &a, MaybeType &sol, bool skip=false)
Assign all (or all but one, if skip is true) variables to values in a If assignment of a variable is ...
void prune(void)
Prune some random values for some random variable.
int n
Number of variables.
int a
How many assigments still to be generated Generate new value according to domain.
virtual bool operator()(void) const =0
Test whether all assignments have been iterated.
const FloatNum max
Largest allowed float value.
virtual Gecode::FloatVal operator[](int i) const
Return value for variable i.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
bool testsubsumed
Whether to test for subsumption.
virtual ~RandomAssignment(void)
Destructor.