36#ifndef __GECODE_TEST_INT_HH__
37#define __GECODE_TEST_INT_HH__
204 void prune(
int i,
bool bounds_only);
244 bool eqv(
void)
const;
246 bool imp(
void)
const;
248 bool pmi(
void)
const;
259 Test(
const std::string&
p,
const std::string& s,
270 Test(
const std::string& s,
281 Test(
const std::string&
p,
const std::string& s,
282 int a,
int min,
int max,
bool r=
false,
292 Test(
const std::string& s,
293 int a,
int min,
int max,
bool r=
false,
307 virtual bool run(
void);
317 static std::string str(
bool b);
319 static std::string str(
int i);
342 bool operator()(
void)
const;
344 void operator++(
void);
360 bool operator()(
void)
const;
362 void operator++(
void);
380 bool operator()(
void)
const;
382 void operator++(
void);
398 bool operator()(
void)
const;
400 void operator++(
void);
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Node * x
Pointer to corresponding Boolean expression node.
Passing integer arguments.
Value iterator for integer sets.
Reification specification.
struct Gecode::Space::@61::@63 c
Data available only during copying.
Base class for all tests to be run
Base class for assignments
Gecode::IntSet d
Domain for each variable.
int n
Number of variables.
virtual ~Assignment(void)
Destructor.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
virtual void operator++(void)=0
Move to next assignment.
int size(void) const
Return number of variables.
virtual bool operator()(void) const =0
Test whether all assignments have been iterated.
virtual int operator[](int i) const =0
Return value for variable i.
Iterator for Boolean operation types.
Generate all assignments.
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
virtual int operator[](int i) const
Return value for variable i.
virtual ~CpltAssignment(void)
Destructor.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Gecode::IntSetValues * dsv
Iterator for each variable.
virtual void operator++(void)
Move to next assignment.
Iterator for basic and advanced integer propagation levels.
Iterator for simple integer propagation levels.
Iterator for integer relation types.
Generate random selection of assignments.
virtual int operator[](int i) const
Return value for variable i.
virtual ~RandomAssignment(void)
Destructor.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
int a
How many assigments still to be generated Generate new value according to domain.
int * vals
The current values for the variables.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
virtual void operator++(void)
Move to next assignment.
Generate random selection of assignments.
int _n1
How many variables in the second set.
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.
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
virtual int operator[](int i) const
Return value for variable i.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
virtual ~RandomMixAssignment(void)
Destructor.
int a
How many assigments still to be generated.
int * vals
The current values for the variables.
virtual void operator++(void)
Move to next assignment.
int randval(const Gecode::IntSet &d)
Space for executing tests.
Gecode::Reify r
Reification information.
TestSpace(int n, Gecode::IntSet &d, Test *t)
Create test space without reification.
Gecode::IntSet d
Initial domain.
void rndrel(const Assignment &a, int i, Gecode::IntRelType &irt, int &v)
Randomly select a pruning rel for variable i.
Test * test
The test currently run.
virtual Gecode::Space * copy(void)
Copy space during cloning.
void post(void)
Post propagator.
bool assigned(void) const
Test whether all variables are assigned.
void prune(void)
Prune some random values for some random variable.
void bound(void)
Assing a random variable to a random bound.
void assign(const Assignment &a, bool skip=false)
Assign all (or all but one, if skip is true) variables to values in a.
bool failed(void)
Compute a fixpoint and check for failure.
bool reified
Whether the test is for a reified propagator.
int rndvar(void)
Randomly select an unassigned variable.
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.
void disable(void)
Disable propagators in space and compute fixpoint (make all idle)
Gecode::IntVarArray x
Variables to be tested.
void enable(void)
Enable propagators in space.
void rel(int i, Gecode::IntRelType irt, int n)
Perform integer tell operation on x[i].
unsigned int propagators(void)
Return the number of propagators.
bool reified
Does the constraint also exist as reified constraint.
bool testsearch
Whether to perform search test.
bool testfix
Whether to perform fixpoint test.
int rms
Which reification modes are supported.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)=0
Post constraint.
Gecode::IntPropLevel ipl
Propagation level.
int arity
Number of variables.
virtual bool solution(const Assignment &) const =0
Check for solution.
Gecode::IntSet dom
Domain of variables.
ConTestLevel contest
Whether to test for certain consistency.
IntRelType
Relation types for integers.
ReifyMode
Mode for reification.
BoolOpType
Operation types for Booleans.
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DEF
Simple propagation levels.
ConTestLevel
Level of consistency to test for.
@ CTL_BOUNDS_Z
Test for bounds(z)-consistency.
@ CTL_BOUNDS_D
Test for bounds(d)-consistency.
@ CTL_NONE
No consistency-test.
@ CTL_DOMAIN
Test for domain-consistency.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const Dictionary &d)
Print statistics summary.