40 #ifndef __GECODE_TEST_INT_HH__ 41 #define __GECODE_TEST_INT_HH__ 208 void prune(
int i,
bool bounds_only);
247 bool eqv(
void)
const;
250 bool imp(
void)
const;
252 bool pmi(
void)
const;
263 Test(
const std::string&
p,
const std::string& s,
274 Test(
const std::string& s,
285 Test(
const std::string&
p,
const std::string& s,
286 int a,
int min,
int max,
bool r=
false,
296 Test(
const std::string& s,
297 int a,
int min,
int max,
bool r=
false,
311 virtual bool run(
void);
321 static std::string
str(
int i);
RandomMixAssignment(int n0, const Gecode::IntSet &d0, int n1, const Gecode::IntSet &d1, int a0)
Initialize for a assignments for n0 variables and values d0.
virtual void operator++(void)
Move to next assignment.
Gecode::IntPropLevel ipl(void) const
Return current level.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
Gecode::IntSet d
Initial domain.
Gecode::IntVarArray x
Variables to be tested.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)=0
Post constraint.
virtual int operator[](int i) const
Return value for variable i.
int size(void) const
Return number of variables.
bool operator()(void) const
Test whether iterator is done.
virtual void operator++(void)
Move to next assignment.
int a
How many assigments still to be generated Generate new value according to domain. ...
BoolOpType
Operation types for Booleans.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
bool imp(void) const
Test whether implication as reification mode is supported.
bool assigned(void) const
Test whether all variables are assigned.
Gecode::BoolOpType bot(void) const
Return current operation type.
Gecode::Reify r
Reification information.
bool operator()(void) const
Test whether iterator is done.
virtual ~RandomAssignment(void)
Destructor.
Gecode::IntSet dom
Domain of variables.
bool failed(void)
Compute a fixpoint and check for failure.
virtual Assignment * assignment(void) const
Create assignment.
void operator++(void)
Increment to next level.
Space for executing tests.
virtual int operator[](int i) const
Return value for variable i.
ConTestLevel contest
Whether to test for certain consistency.
const int max
Largest allowed integer value.
int rms
Which reification modes are supported.
int _n1
How many variables in the second set.
virtual ~CpltAssignment(void)
Destructor.
Generate random selection of assignments.
const int min
Smallest allowed integer value.
Iterator for basic and advanced integer propagation levels.
void operator++(void)
Increment to next level.
int n
Number of variables.
virtual Gecode::Space * copy(bool share)
Copy space during cloning.
virtual int operator[](int i) const =0
Return value for variable i.
Gecode::IntSet d
Domain for each variable.
void prune(void)
Prune some random values for some random variable.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void rndrel(const Assignment &a, int i, Gecode::IntRelType &irt, int &v)
Randomly select a pruning rel for variable i.
Generate random selection of assignments.
virtual bool run(void)
Perform test.
IntRelType
Relation types for integers.
ConTestLevel
Level of consistency to test for.
void rel(int i, Gecode::IntRelType irt, int n)
Perform integer tell operation on x[i].
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
int a
How many assigments still to be generated.
void bound(void)
Assing a random variable to a random bound.
Simple propagation levels.
int * vals
The current values for the variables.
Gecode::IntRelType irt(void) const
Return current relation type.
IntRelTypes(void)
Initialize iterator.
Iterator for integer relation types.
virtual void operator++(void)=0
Move to next assignment.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Reification specification.
Base class for all tests to be run
TestSpace(int n, Gecode::IntSet &d, Test *t)
Create test space without reification.
Gecode::IntSetValues * dsv
Iterator for each variable.
Test for bounds(z)-consistency.
Test for bounds(d)-consistency.
Test for domain-consistency.
int randval(const Gecode::IntSet &d)
virtual bool operator()(void) const
Test whether all assignments have been iterated.
unsigned int propagators(void)
Return the number of propagators.
Gecode::IntPropLevel ipl
Propagation level.
void disable(void)
Disable propagators in space and compute fixpoint (make all idle)
IntPropBasicAdvanced(void)
Initialize iterator.
Passing integer arguments.
void operator++(void)
Increment to next operation type.
bool testfix
Whether to perform fixpoint test.
void enable(void)
Enable propagators in space.
virtual ~RandomMixAssignment(void)
Destructor.
IntPropLevel
Propagation levels for integer propagators.
Post propagator for SetVar SetOpType SetVar y
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
Node * x
Pointer to corresponding Boolean expression node.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
bool testsearch
Whether to perform search test.
bool operator()(void) const
Test whether iterator is done.
virtual int operator[](int i) const
Return value for variable i.
void assign(const Assignment &a, bool skip=false)
Assign all (or all but one, if skip is true) variables to values in a.
Base class for assignments
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
struct Gecode::Space::@56::@58 c
Data available only during copying.
Value iterator for integer sets.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
void operator++(void)
Increment to next relation type.
IntPropLevels(void)
Initialize iterator.
bool disabled(const Assignment &a, TestSpace &c, bool testfix)
Prune values also in a space c with disabled propagators, but not those in assignment a...
BoolOpTypes(void)
Initialize iterator.
Iterator for Boolean operation types.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatView &x)
Print float variable view.
int arity
Number of variables.
virtual bool ignore(const Assignment &) const
Whether to ignore assignment for reification.
virtual bool operator()(void) const =0
Test whether all assignments have been iterated.
void reset(void)
Reset iterator.
virtual void operator++(void)
Move to next assignment.
virtual ~Assignment(void)
Destructor.
Test * test
The test currently run.
ReifyMode
Mode for reification.
void post(void)
Post propagator.
Gecode::IntPropLevel ipl(void) const
Return current level.
bool reified
Does the constraint also exist as reified constraint.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Test(const std::string &p, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntPropLevel i=Gecode::IPL_DEF)
Constructor.
Generate all assignments.
Iterator for simple integer propagation levels.
bool operator()(void) const
Test whether iterator is done.
int * vals
The current values for the variables.
bool reified
Whether the test is for a reified propagator.
virtual bool solution(const Assignment &) const =0
Check for solution.
int rndvar(void)
Randomly select an unassigned variable.