Generated on Tue Apr 18 10:24:39 2017 for Gecode by doxygen 1.6.3

Test::Set::SetTestSpace Class Reference
[General set test support]

Space for executing set tests. More...

#include <set.hh>

List of all members.

Public Member Functions

 SetTestSpace (int n, Gecode::IntSet &d0, int i, SetTest *t, bool log=true)
 Create test space without reification.
 SetTestSpace (int n, Gecode::IntSet &d0, int i, SetTest *t, Gecode::ReifyMode rm, bool log=true)
 Create test space with reification.
 SetTestSpace (bool share, SetTestSpace &s)
 Constructor for cloning s.
virtual Gecode::Spacecopy (bool share)
 Copy space during cloning.
void post (void)
 Post propagator.
bool failed (void)
 Compute a fixpoint and check for failure.
bool subsumed (bool b)
 Check for subsumption if b is true.
void rel (int i, Gecode::SetRelType srt, const Gecode::IntSet &is)
 Perform set tell operation on x[i].
void cardinality (int i, int cmin, int cmax)
 Perform cardinality tell operation on x[i].
void rel (int i, Gecode::IntRelType irt, int n)
 Perform integer tell operation on y[i].
void rel (bool sol)
 Perform Boolean tell on b.
void assign (const SetAssignment &a)
 Assign all variables to values in a.
bool assigned (void) const
 Test whether all variables are assigned.
void removeFromLub (int v, int i, const SetAssignment &a)
 Remove value v from the upper bound of x[i].
void removeFromLub (int v, int i, const SetAssignment &a, SetTestSpace &c)
 Remove value v from the upper bound of x[i].
void addToGlb (int v, int i, const SetAssignment &a)
 Remove value v from the lower bound of x[i].
void addToGlb (int v, int i, const SetAssignment &a, SetTestSpace &c)
 Remove value v from the lower bound of x[i].
bool fixprob (void)
 Perform fixpoint computation.
bool prune (const SetAssignment &a)
 Perform random pruning.
unsigned int propagators (void)
 Return the number of propagators.
void disable (void)
 Disable propagators in space and compute fixpoint (make all idle).
void enable (void)
 Enable propagators in space.
bool disabled (const SetAssignment &a, SetTestSpace &c)
 Prune values also in a space c with disabled propagators, but not those in assignment a.
bool same (SetTestSpace &c)
 Check whether propagation is the same as in c.

Public Attributes

Gecode::IntSet d
 Initial domain.
Gecode::SetVarArray x
 Set variables to be tested.
Gecode::IntVarArray y
 Int variables to be tested.
int withInt
 How many integer variables are used by the test.
Gecode::Reify r
 Reification information.
bool reified
 Whether the test is for a reified propagator.
SetTesttest
 The test currently run.

Detailed Description

Space for executing set tests.

Definition at line 198 of file set.hh.


Constructor & Destructor Documentation

Test::Set::SetTestSpace::SetTestSpace ( int  n,
Gecode::IntSet d0,
int  i,
SetTest t,
bool  log = true 
)

Create test space without reification.

Creates n set variables with domain d0, i integer variables with domain d0, and stores whether the test is for a reified propagator (r), and the test itself (t).

Definition at line 124 of file set.cpp.

Test::Set::SetTestSpace::SetTestSpace ( int  n,
Gecode::IntSet d0,
int  i,
SetTest t,
Gecode::ReifyMode  rm,
bool  log = true 
)

Create test space with reification.

Creates n set variables with domain d0, i integer variables with domain d0, and stores whether the test is for a reified propagator (r), and the test itself (t).

Definition at line 144 of file set.cpp.

Test::Set::SetTestSpace::SetTestSpace ( bool  share,
SetTestSpace s 
)

Constructor for cloning s.

Definition at line 157 of file set.cpp.


Member Function Documentation

Gecode::Space * Test::Set::SetTestSpace::copy ( bool  share  )  [virtual]

Copy space during cloning.

Implements Gecode::Space.

Definition at line 169 of file set.cpp.

void Test::Set::SetTestSpace::post ( void   ) 

Post propagator.

Definition at line 174 of file set.cpp.

bool Test::Set::SetTestSpace::failed ( void   ) 

Compute a fixpoint and check for failure.

Definition at line 187 of file set.cpp.

bool Test::Set::SetTestSpace::subsumed ( bool  b  ) 

Check for subsumption if b is true.

Definition at line 201 of file set.cpp.

void Test::Set::SetTestSpace::rel ( int  i,
Gecode::SetRelType  srt,
const Gecode::IntSet is 
)

Perform set tell operation on x[i].

Definition at line 206 of file set.cpp.

void Test::Set::SetTestSpace::cardinality ( int  i,
int  cmin,
int  cmax 
)

Perform cardinality tell operation on x[i].

Definition at line 227 of file set.cpp.

void Test::Set::SetTestSpace::rel ( int  i,
Gecode::IntRelType  irt,
int  n 
)

Perform integer tell operation on y[i].

Definition at line 236 of file set.cpp.

void Test::Set::SetTestSpace::rel ( bool  sol  ) 

Perform Boolean tell on b.

Definition at line 253 of file set.cpp.

void Test::Set::SetTestSpace::assign ( const SetAssignment a  ) 

Assign all variables to values in a.

Definition at line 262 of file set.cpp.

bool Test::Set::SetTestSpace::assigned ( void   )  const

Test whether all variables are assigned.

Definition at line 278 of file set.cpp.

void Test::Set::SetTestSpace::removeFromLub ( int  v,
int  i,
const SetAssignment a 
)

Remove value v from the upper bound of x[i].

Definition at line 289 of file set.cpp.

void Test::Set::SetTestSpace::removeFromLub ( int  v,
int  i,
const SetAssignment a,
SetTestSpace c 
)

Remove value v from the upper bound of x[i].

Definition at line 302 of file set.cpp.

void Test::Set::SetTestSpace::addToGlb ( int  v,
int  i,
const SetAssignment a 
)

Remove value v from the lower bound of x[i].

Definition at line 317 of file set.cpp.

void Test::Set::SetTestSpace::addToGlb ( int  v,
int  i,
const SetAssignment a,
SetTestSpace c 
)

Remove value v from the lower bound of x[i].

Definition at line 330 of file set.cpp.

bool Test::Set::SetTestSpace::fixprob ( void   ) 

Perform fixpoint computation.

Definition at line 345 of file set.cpp.

bool Test::Set::SetTestSpace::prune ( const SetAssignment a  ) 

Perform random pruning.

Definition at line 409 of file set.cpp.

unsigned int Test::Set::SetTestSpace::propagators ( void   ) 

Return the number of propagators.

Definition at line 689 of file set.cpp.

void Test::Set::SetTestSpace::disable ( void   ) 

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

Definition at line 699 of file set.cpp.

void Test::Set::SetTestSpace::enable ( void   ) 

Enable propagators in space.

Definition at line 694 of file set.cpp.

bool Test::Set::SetTestSpace::disabled ( const SetAssignment a,
SetTestSpace c 
)

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

Definition at line 545 of file set.cpp.

bool Test::Set::SetTestSpace::same ( SetTestSpace c  ) 

Check whether propagation is the same as in c.

Definition at line 378 of file set.cpp.


Member Data Documentation

Initial domain.

Definition at line 201 of file set.hh.

Set variables to be tested.

Definition at line 203 of file set.hh.

Int variables to be tested.

Definition at line 205 of file set.hh.

How many integer variables are used by the test.

Definition at line 207 of file set.hh.

Reification information.

Definition at line 209 of file set.hh.

Whether the test is for a reified propagator.

Definition at line 211 of file set.hh.

The test currently run.

Definition at line 213 of file set.hh.


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