Generated on Sat Aug 25 2012 03:33:14 for Gecode by doxygen 1.8.1.2
Test::Int::TestSpace Class Reference

Space for executing tests. More...

#include <int.hh>

Public Member Functions

 TestSpace (int n, Gecode::IntSet &d0, bool r, Test *t, bool log=true)
 Create test space.
 TestSpace (bool share, TestSpace &s)
 Constructor for cloning s.
virtual Gecode::Spacecopy (bool share)
 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.
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.
- Public Member Functions inherited from Gecode::Space
 Space (void)
 Default constructor.
virtual ~Space (void)
 Destructor.
 Space (bool share, Space &s)
 Constructor for cloning.
virtual void constrain (const Space &best)
 Constrain function for best solution search.
SpaceStatus status (StatusStatistics &stat=unused_status)
 Query space status.
const Choicechoice (void)
 Create new choice for current brancher.
const Choicechoice (Archive &e) const
 Create new choice from e.
Spaceclone (bool share=true, CloneStatistics &stat=unused_clone) const
 Clone space.
void commit (const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
 Commit choice c for alternative a.
void notice (Actor &a, ActorProperty p)
 Notice actor property.
void ignore (Actor &a, ActorProperty p)
 Ignore actor property.
ExecStatus ES_SUBSUMED (Propagator &p)
 Propagator p is subsumed
ExecStatus ES_SUBSUMED_DISPOSED (Propagator &p, size_t s)
 Propagator p is subsumed
ExecStatus ES_FIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has computed partial fixpoint
ExecStatus ES_NOFIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has not computed partial fixpoint
template<class A >
ExecStatus ES_FIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed
template<class A >
ExecStatus ES_NOFIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be run
template<class A >
ExecStatus ES_NOFIX_DISPOSE_FORCE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be forcefully rescheduled
void fail (void)
 Fail space.
bool failed (void) const
 Check whether space is failed.
bool stable (void) const
 Return if space is stable (at fixpoint or failed)
unsigned int propagators (void) const
 Return number of propagators.
unsigned int branchers (void) const
 Return number of branchers.
template<class T >
T * alloc (long unsigned int n)
 Allocate block of n objects of type T from space heap.
template<class T >
T * alloc (long int n)
 Allocate block of n objects of type T from space heap.
template<class T >
T * alloc (unsigned int n)
 Allocate block of n objects of type T from space heap.
template<class T >
T * alloc (int n)
 Allocate block of n objects of type T from space heap.
template<class T >
void free (T *b, long unsigned int n)
 Delete n objects allocated from space heap starting at b.
template<class T >
void free (T *b, long int n)
 Delete n objects allocated from space heap starting at b.
template<class T >
void free (T *b, unsigned int n)
 Delete n objects allocated from space heap starting at b.
template<class T >
void free (T *b, int n)
 Delete n objects allocated from space heap starting at b.
template<class T >
T * realloc (T *b, long unsigned int n, long unsigned int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T >
T * realloc (T *b, long int n, long int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T >
T * realloc (T *b, unsigned int n, unsigned int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T >
T * realloc (T *b, int n, int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T >
T ** realloc (T **b, long unsigned int n, long unsigned int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
template<class T >
T ** realloc (T **b, long int n, long int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
template<class T >
T ** realloc (T **b, unsigned int n, unsigned int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
template<class T >
T ** realloc (T **b, int n, int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
void * ralloc (size_t s)
 Allocate memory on space heap.
void rfree (void *p, size_t s)
 Free memory previously allocated with alloc (might be reused later)
void * rrealloc (void *b, size_t n, size_t m)
 Reallocate memory block starting at b from size n to size s.
template<size_t >
void * fl_alloc (void)
 Allocate from freelist-managed memory.
template<size_t >
void fl_dispose (FreeList *f, FreeList *l)
 Return freelist-managed memory to freelist.
size_t allocated (void) const
 Return how much heap memory is allocated.
void flush (void)
 Flush cached memory blocks and AFC information.
Home operator() (Propagator &p)
 Return a home for this space with the information that p is being rewritten.
template<class T >
T & construct (void)
 Construction routines.
template<class T , typename A1 >
T & construct (A1 const &a1)
 Constructs a single object of type T from space heap using a unary constructor.
template<class T , typename A1 , typename A2 >
T & construct (A1 const &a1, A2 const &a2)
 Constructs a single object of type T from space heap using a binary constructor.
template<class T , typename A1 , typename A2 , typename A3 >
T & construct (A1 const &a1, A2 const &a2, A3 const &a3)
 Constructs a single object of type T from space heap using a ternary constructor.
template<class T , typename A1 , typename A2 , typename A3 , typename A4 >
T & construct (A1 const &a1, A2 const &a2, A3 const &a3, A4 const &a4)
 Constructs a single object of type T from space heap using a quaternary constructor.
template<class T , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
T & construct (A1 const &a1, A2 const &a2, A3 const &a3, A4 const &a4, A5 const &a5)
 Constructs a single object of type T from space heap using a quinary constructor.

Public Attributes

Gecode::IntSet d
 Initial domain.
Gecode::IntVarArray x
 Variables to be tested.
Gecode::BoolVar b
 Control variable for reified propagators.
bool reified
 Whether the test is for a reified propagator.
Testtest
 The test currently run.

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Space
static void * operator new (size_t)
 Allocate memory from heap for new space.
static void operator delete (void *)
 Free memory allocated from heap.

Detailed Description

Space for executing tests.

Definition at line 153 of file int.hh.

Constructor & Destructor Documentation

Test::Int::TestSpace::TestSpace ( int  n,
Gecode::IntSet d0,
bool  r,
Test t,
bool  log = true 
)

Create test space.

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

Definition at line 95 of file int.cpp.

Test::Int::TestSpace::TestSpace ( bool  share,
TestSpace s 
)

Constructor for cloning s.

Definition at line 105 of file int.cpp.

Member Function Documentation

Gecode::Space * Test::Int::TestSpace::copy ( bool  share)
virtual

Copy space during cloning.

Implements Gecode::Space.

Definition at line 112 of file int.cpp.

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

Test whether all variables are assigned.

Definition at line 117 of file int.cpp.

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

Post propagator.

Definition at line 125 of file int.cpp.

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

Compute a fixpoint and check for failure.

Definition at line 138 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 150 of file int.cpp.

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

Perform Boolean tell on b.

Definition at line 167 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 176 of file int.cpp.

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

Assing a random variable to a random bound.

Definition at line 188 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 200 of file int.cpp.

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

Prune some random values for some random variable.

Definition at line 233 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 244 of file int.cpp.

Member Data Documentation

Gecode::IntSet Test::Int::TestSpace::d

Initial domain.

Definition at line 156 of file int.hh.

Gecode::IntVarArray Test::Int::TestSpace::x

Variables to be tested.

Definition at line 158 of file int.hh.

Gecode::BoolVar Test::Int::TestSpace::b

Control variable for reified propagators.

Definition at line 160 of file int.hh.

bool Test::Int::TestSpace::reified

Whether the test is for a reified propagator.

Definition at line 162 of file int.hh.

Test* Test::Int::TestSpace::test

The test currently run.

Definition at line 164 of file int.hh.


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