Generated on Thu Apr 11 14:00:15 2019 for Gecode by doxygen 1.6.3

Test::Int::TestSpace Class Reference
[General test support]

Space for executing tests. More...

#include <int.hh>

List of all members.

Public Member Functions

 TestSpace (int n, Gecode::IntSet &d, Test *t)
 Create test space without reification.
 TestSpace (int n, Gecode::IntSet &d, Test *t, Gecode::ReifyMode rm)
 Create test space with reification.
 TestSpace (TestSpace &s)
 Constructor for cloning s.
virtual Gecode::Spacecopy (void)
 Copy space during cloning.
bool assigned (void) const
 Test whether all variables are assigned.
void post (void)
 Post propagator.
bool failed (void)
 Compute a fixpoint and check for failure.
int rndvar (void)
 Randomly select an unassigned variable.
void rndrel (const Assignment &a, int i, Gecode::IntRelType &irt, int &v)
 Randomly select a pruning rel for variable i.
void rel (int i, Gecode::IntRelType irt, int n)
 Perform integer tell operation on x[i].
void rel (bool sol)
 Perform Boolean tell on b.
void assign (const Assignment &a, bool skip=false)
 Assign all (or all but one, if skip is true) variables to values in a.
void bound (void)
 Assing a random variable to a random bound.
void prune (int i, bool bounds_only)
 Prune some random values from variable i.
void prune (void)
 Prune some random values for some random variable.
bool prune (const Assignment &a, bool testfix)
 Prune values but not those in assignment a.
void disable (void)
 Disable propagators in space and compute fixpoint (make all idle).
void enable (void)
 Enable propagators in space.
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.
unsigned int propagators (void)
 Return the number of propagators.

Public Attributes

Gecode::IntSet d
 Initial domain.
Gecode::IntVarArray x
 Variables to be tested.
Gecode::Reify r
 Reification information.
Testtest
 The test currently run.
bool reified
 Whether the test is for a reified propagator.

Detailed Description

Space for executing tests.

Definition at line 149 of file int.hh.


Constructor & Destructor Documentation

Test::Int::TestSpace::TestSpace ( int  n,
Gecode::IntSet d,
Test t 
)

Create test space without reification.

Creates n variables with domain d for test t.

Definition at line 91 of file int.cpp.

Test::Int::TestSpace::TestSpace ( int  n,
Gecode::IntSet d,
Test t,
Gecode::ReifyMode  rm 
)

Create test space with reification.

Creates n variables with domain d for test t and stores the reification mode rm.

Definition at line 106 of file int.cpp.

Test::Int::TestSpace::TestSpace ( TestSpace s  ) 

Constructor for cloning s.

Definition at line 122 of file int.cpp.


Member Function Documentation

Gecode::Space * Test::Int::TestSpace::copy ( void   )  [virtual]

Copy space during cloning.

Implements Gecode::Space.

Definition at line 132 of file int.cpp.

bool Test::Int::TestSpace::assigned ( void   )  const

Test whether all variables are assigned.

Definition at line 137 of file int.cpp.

void Test::Int::TestSpace::post ( void   ) 

Post propagator.

Definition at line 145 of file int.cpp.

bool Test::Int::TestSpace::failed ( void   ) 

Compute a fixpoint and check for failure.

Definition at line 158 of file int.cpp.

int Test::Int::TestSpace::rndvar ( void   ) 

Randomly select an unassigned variable.

Definition at line 170 of file int.cpp.

void Test::Int::TestSpace::rndrel ( const Assignment a,
int  i,
Gecode::IntRelType irt,
int &  v 
)

Randomly select a pruning rel for variable i.

Definition at line 181 of file int.cpp.

void Test::Int::TestSpace::rel ( int  i,
Gecode::IntRelType  irt,
int  n 
)

Perform integer tell operation on x[i].

Definition at line 233 of file int.cpp.

void Test::Int::TestSpace::rel ( bool  sol  ) 

Perform Boolean tell on b.

Definition at line 250 of file int.cpp.

void Test::Int::TestSpace::assign ( const Assignment a,
bool  skip = false 
)

Assign all (or all but one, if skip is true) variables to values in a.

Definition at line 259 of file int.cpp.

void Test::Int::TestSpace::bound ( void   ) 

Assing a random variable to a random bound.

Definition at line 272 of file int.cpp.

void Test::Int::TestSpace::prune ( int  i,
bool  bounds_only 
)

Prune some random values from variable i.

If bounds_only is true, then the pruning is only done on the bounds of the variable.

Definition at line 280 of file int.cpp.

void Test::Int::TestSpace::prune ( void   ) 

Prune some random values for some random variable.

Definition at line 316 of file int.cpp.

bool Test::Int::TestSpace::prune ( const Assignment a,
bool  testfix 
)

Prune values but not those in assignment a.

Definition at line 321 of file int.cpp.

void Test::Int::TestSpace::disable ( void   ) 

Disable propagators in space and compute fixpoint (make all idle).

Definition at line 367 of file int.cpp.

void Test::Int::TestSpace::enable ( void   ) 

Enable propagators in space.

Definition at line 362 of file int.cpp.

bool Test::Int::TestSpace::disabled ( const Assignment a,
TestSpace c,
bool  testfix 
)

Prune values also in a space c with disabled propagators, but not those in assignment a.

Definition at line 373 of file int.cpp.

unsigned int Test::Int::TestSpace::propagators ( void   ) 

Return the number of propagators.

Definition at line 421 of file int.cpp.


Member Data Documentation

Initial domain.

Definition at line 152 of file int.hh.

Variables to be tested.

Definition at line 154 of file int.hh.

Reification information.

Definition at line 156 of file int.hh.

The test currently run.

Definition at line 158 of file int.hh.

Whether the test is for a reified propagator.

Definition at line 160 of file int.hh.


The documentation for this class was generated from the following files: