Generated on Tue May 22 09:41:48 2018 for Gecode by doxygen 1.6.3

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

Space for executing tests. More...

#include <float.hh>

List of all members.

Public Member Functions

 TestSpace (int n, Gecode::FloatVal &d, Gecode::FloatNum s, Test *t)
 Create test space.
 TestSpace (int n, Gecode::FloatVal &d, Gecode::FloatNum s, Test *t, Gecode::ReifyMode rm)
 Create test space.
 TestSpace (TestSpace &s)
 Constructor for cloning s.
virtual Gecode::Spacecopy (void)
 Copy space during cloning.
virtual void dropUntil (const Assignment &a)
 Add constraints to skip solutions to the a assignment.
bool assigned (void) const
 Test whether all variables are assigned.
bool matchAssignment (const Assignment &a) const
 Test whether all variables match assignment a.
void post (void)
 Post propagator.
bool failed (void)
 Compute a fixpoint and check for failure.
void rel (int i, Gecode::FloatRelType frt, Gecode::FloatVal n)
 Perform integer tell operation on x[i].
void rel (bool sol)
 Perform Boolean tell on b.
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 MT_MAYBE (if the two intervals are contiguous), sol is set to MT_MAYBE.
void bound (void)
 Assing a random variable to a random bound.
Gecode::FloatNum cut (int *cutDirections)
 Cut the bigger variable to an half sized interval. It returns the new size of the cut interval. cutDirections gives the direction to follow (upper part or lower part of the interval).
void prune (int i)
 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.
unsigned int propagators (void)
 Return the number of propagators.

Public Attributes

Gecode::FloatVal d
 Initial domain.
Gecode::FloatNum step
 Step for going to next solution.
Gecode::FloatVarArray 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 166 of file float.hh.


Constructor & Destructor Documentation

Test::Float::TestSpace::TestSpace ( int  n,
Gecode::FloatVal d,
Gecode::FloatNum  s,
Test t 
)

Create test space.

Creates n variables with domain d and step s for test t.

Definition at line 143 of file float.cpp.

Test::Float::TestSpace::TestSpace ( int  n,
Gecode::FloatVal d,
Gecode::FloatNum  s,
Test t,
Gecode::ReifyMode  rm 
)

Create test space.

Creates n variables with domain d and step s for test t annd reification mode rm.

Definition at line 160 of file float.cpp.

Test::Float::TestSpace::TestSpace ( TestSpace s  ) 

Constructor for cloning s.

Definition at line 171 of file float.cpp.


Member Function Documentation

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

Copy space during cloning.

Implements Gecode::Space.

Definition at line 181 of file float.cpp.

void Test::Float::TestSpace::dropUntil ( const Assignment a  )  [virtual]

Add constraints to skip solutions to the a assignment.

Definition at line 197 of file float.cpp.

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

Test whether all variables are assigned.

Definition at line 203 of file float.cpp.

bool Test::Float::TestSpace::matchAssignment ( const Assignment a  )  const

Test whether all variables match assignment a.

Definition at line 211 of file float.cpp.

void Test::Float::TestSpace::post ( void   ) 

Post propagator.

Definition at line 219 of file float.cpp.

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

Compute a fixpoint and check for failure.

Definition at line 232 of file float.cpp.

void Test::Float::TestSpace::rel ( int  i,
Gecode::FloatRelType  frt,
Gecode::FloatVal  n 
)

Perform integer tell operation on x[i].

Definition at line 244 of file float.cpp.

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

Perform Boolean tell on b.

Definition at line 261 of file float.cpp.

void Test::Float::TestSpace::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 MT_MAYBE (if the two intervals are contiguous), sol is set to MT_MAYBE.

Definition at line 270 of file float.cpp.

void Test::Float::TestSpace::bound ( void   ) 

Assing a random variable to a random bound.

Definition at line 288 of file float.cpp.

Gecode::FloatNum Test::Float::TestSpace::cut ( int *  cutDirections  ) 

Cut the bigger variable to an half sized interval. It returns the new size of the cut interval. cutDirections gives the direction to follow (upper part or lower part of the interval).

Definition at line 303 of file float.cpp.

void Test::Float::TestSpace::prune ( int  i  ) 

Prune some random values from variable i.

Definition at line 332 of file float.cpp.

void Test::Float::TestSpace::prune ( void   ) 

Prune some random values for some random variable.

Definition at line 348 of file float.cpp.

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

Prune values but not those in assignment a.

Definition at line 359 of file float.cpp.

void Test::Float::TestSpace::disable ( void   ) 

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

Definition at line 191 of file float.cpp.

void Test::Float::TestSpace::enable ( void   ) 

Enable propagators in space.

Definition at line 186 of file float.cpp.

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

Return the number of propagators.

Definition at line 410 of file float.cpp.


Member Data Documentation

Initial domain.

Definition at line 169 of file float.hh.

Step for going to next solution.

Definition at line 171 of file float.hh.

Variables to be tested.

Definition at line 173 of file float.hh.

Reification information.

Definition at line 175 of file float.hh.

The test currently run.

Definition at line 177 of file float.hh.

Whether the test is for a reified propagator.

Definition at line 179 of file float.hh.


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