40 #ifndef __GECODE_TEST_INT_HH__ 41 #define __GECODE_TEST_INT_HH__ 204 void prune(
int i,
bool bounds_only);
235 bool eqv(
void)
const;
238 bool imp(
void)
const;
240 bool pmi(
void)
const;
251 Test(
const std::string&
p,
const std::string& s,
262 Test(
const std::string& s,
273 Test(
const std::string&
p,
const std::string& s,
274 int a,
int min,
int max,
bool r=
false,
284 Test(
const std::string& s,
285 int a,
int min,
int max,
bool r=
false,
299 virtual bool run(
void);
311 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.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
Gecode::IntSet d
Initial domain.
IntConLevel
Consistency levels for integer propagators.
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.
Test(const std::string &p, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF)
Constructor.
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.
Iterator for integer consistency levels.
bool failed(void)
Compute a fixpoint and check for failure.
virtual Assignment * assignment(void) const
Create assignment.
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.
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.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
void prune(void)
Prune some random values for some random variable.
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.
Generate random selection of assignments.
virtual bool run(void)
Perform test.
Gecode::IntConLevel icl
Consistency level.
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 operator++(void)
Increment to next level.
void bound(void)
Assing a random variable to a random bound.
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.
ExtensionalPropKind
Extensional propagation kind.
Passing integer arguments.
void operator++(void)
Increment to next operation type.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
bool testfix
Whether to perform fixpoint test.
virtual ~RandomMixAssignment(void)
Destructor.
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.
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
Gecode::IntConLevel icl(void) const
Return current level.
IntConLevels(void)
Initialize iterator.
The default consistency for a constraint.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
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.
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.
bool operator()(void) const
Test whether iterator is done.
Test * test
The test currently run.
ReifyMode
Mode for reification.
void post(void)
Post propagator.
bool reified
Does the constraint also exist as reified constraint.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Generate all assignments.
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.