Generated on Sat Feb 7 2015 02:01:53 for Gecode by doxygen 1.8.9.1

Space for executing tests. More...

#include <float.hh>

Public Member Functions

 TestSpace (int n, Gecode::FloatVal &d, Gecode::FloatNum s, Test *t)
 Create test space. More...
 
 TestSpace (int n, Gecode::FloatVal &d, Gecode::FloatNum s, Test *t, Gecode::ReifyMode rm)
 Create test space. More...
 
 TestSpace (bool share, TestSpace &s)
 Constructor for cloning s. More...
 
virtual Gecode::Spacecopy (bool share)
 Copy space during cloning. More...
 
virtual void dropUntil (const Assignment &a)
 Add constraints to skip solutions to the a assignment. More...
 
bool assigned (void) const
 Test whether all variables are assigned. More...
 
bool matchAssignment (const Assignment &a) const
 Test whether all variables match assignment a. More...
 
void post (void)
 Post propagator. More...
 
bool failed (void)
 Compute a fixpoint and check for failure. More...
 
void rel (int i, Gecode::FloatRelType frt, Gecode::FloatVal n)
 Perform integer tell operation on x[i]. More...
 
void rel (bool sol)
 Perform Boolean tell on b. More...
 
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. More...
 
void bound (void)
 Assing a random variable to a random bound. More...
 
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). More...
 
void prune (int i)
 Prune some random values from variable i. More...
 
void prune (void)
 Prune some random values for some random variable. More...
 
bool prune (const Assignment &a, bool testfix)
 Prune values but not those in assignment a. More...
 
- Public Member Functions inherited from Gecode::Space
 Space (void)
 Default constructor. More...
 
virtual ~Space (void)
 Destructor. More...
 
 Space (bool share, Space &s)
 Constructor for cloning. More...
 
virtual void constrain (const Space &best)
 Constrain function for best solution search. More...
 
virtual bool master (const CRI &cri)
 Master configuration function for restart meta search engine. More...
 
virtual bool slave (const CRI &cri)
 Slave configuration function for restart meta search engine. More...
 
SpaceStatus status (StatusStatistics &stat=unused_status)
 Query space status. More...
 
const Choicechoice (void)
 Create new choice for current brancher. More...
 
const Choicechoice (Archive &e) const
 Create new choice from e. More...
 
Spaceclone (bool share=true, CloneStatistics &stat=unused_clone) const
 Clone space. More...
 
void commit (const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
 Commit choice c for alternative a. More...
 
void trycommit (const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
 If possible, commit choice c for alternative a. More...
 
NGLngl (const Choice &c, unsigned int a)
 Create no-good literal for choice c and alternative a. More...
 
void print (const Choice &c, unsigned int a, std::ostream &o) const
 Print branch for choice c and alternative a. More...
 
void notice (Actor &a, ActorProperty p, bool duplicate=false)
 Notice actor property. More...
 
void ignore (Actor &a, ActorProperty p, bool duplicate=false)
 Ignore actor property. More...
 
ExecStatus ES_SUBSUMED (Propagator &p)
 
ExecStatus ES_SUBSUMED_DISPOSED (Propagator &p, size_t s)
 Propagator p is subsumed More...
 
ExecStatus ES_FIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has computed partial fixpoint More...
 
ExecStatus ES_NOFIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has not computed partial fixpoint More...
 
template<class A >
ExecStatus ES_FIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed More...
 
template<class A >
ExecStatus ES_NOFIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be run More...
 
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 More...
 
void fail (void)
 Fail space. More...
 
bool failed (void) const
 Check whether space is failed. More...
 
bool stable (void) const
 Return if space is stable (at fixpoint or failed) More...
 
unsigned int propagators (void) const
 Return number of propagators. More...
 
unsigned int branchers (void) const
 Return number of branchers. More...
 
template<class T >
T * alloc (long unsigned int n)
 Allocate block of n objects of type T from space heap. More...
 
template<class T >
T * alloc (long int n)
 Allocate block of n objects of type T from space heap. More...
 
template<class T >
T * alloc (unsigned int n)
 Allocate block of n objects of type T from space heap. More...
 
template<class T >
T * alloc (int n)
 Allocate block of n objects of type T from space heap. More...
 
template<class T >
void free (T *b, long unsigned int n)
 Delete n objects allocated from space heap starting at b. More...
 
template<class T >
void free (T *b, long int n)
 Delete n objects allocated from space heap starting at b. More...
 
template<class T >
void free (T *b, unsigned int n)
 Delete n objects allocated from space heap starting at b. More...
 
template<class T >
void free (T *b, int n)
 Delete n objects allocated from space heap starting at b. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void * ralloc (size_t s)
 Allocate memory on space heap. More...
 
void rfree (void *p, size_t s)
 Free memory previously allocated with alloc (might be reused later) More...
 
void * rrealloc (void *b, size_t n, size_t m)
 Reallocate memory block starting at b from size n to size s. More...
 
template<size_t >
void * fl_alloc (void)
 Allocate from freelist-managed memory. More...
 
template<size_t >
void fl_dispose (FreeList *f, FreeList *l)
 Return freelist-managed memory to freelist. More...
 
void flush (void)
 Flush cached memory blocks. More...
 
Home operator() (Propagator &p)
 Return a home for this space with the information that p is being rewritten. More...
 
template<class T >
T & construct (void)
 Construction routines. More...
 
template<class T , typename A1 >
T & construct (A1 const &a1)
 Constructs a single object of type T from space heap using a unary constructor. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void afc_decay (double d)
 Set AFC decay factor to d More...
 
double afc_decay (void) const
 Return AFC decay factor. More...
 
void afc_set (double a)
 Reset AFC to a. More...
 

Public Attributes

Gecode::FloatVal d
 Initial domain. More...
 
Gecode::FloatNum step
 Step for going to next solution. More...
 
Gecode::FloatVarArray x
 Variables to be tested. More...
 
Gecode::Reify r
 Reification information. More...
 
Testtest
 The test currently run. More...
 
bool reified
 Whether the test is for a reified propagator. More...
 

Additional Inherited Members

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

Detailed Description

Space for executing tests.

Definition at line 170 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 147 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 164 of file float.cpp.

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

Constructor for cloning s.

Definition at line 175 of file float.cpp.

Member Function Documentation

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

Copy space during cloning.

Implements Gecode::Space.

Definition at line 185 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 190 of file float.cpp.

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

Test whether all variables are assigned.

Definition at line 196 of file float.cpp.

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

Test whether all variables match assignment a.

Definition at line 204 of file float.cpp.

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

Post propagator.

Definition at line 212 of file float.cpp.

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

Compute a fixpoint and check for failure.

Definition at line 225 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 237 of file float.cpp.

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

Perform Boolean tell on b.

Definition at line 254 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 263 of file float.cpp.

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

Assing a random variable to a random bound.

Definition at line 281 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 296 of file float.cpp.

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

Prune some random values from variable i.

Definition at line 325 of file float.cpp.

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

Prune some random values for some random variable.

Definition at line 341 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 352 of file float.cpp.

Member Data Documentation

Gecode::FloatVal Test::Float::TestSpace::d

Initial domain.

Definition at line 173 of file float.hh.

Gecode::FloatNum Test::Float::TestSpace::step

Step for going to next solution.

Definition at line 175 of file float.hh.

Gecode::FloatVarArray Test::Float::TestSpace::x

Variables to be tested.

Definition at line 177 of file float.hh.

Gecode::Reify Test::Float::TestSpace::r

Reification information.

Definition at line 179 of file float.hh.

Test* Test::Float::TestSpace::test

The test currently run.

Definition at line 181 of file float.hh.

bool Test::Float::TestSpace::reified

Whether the test is for a reified propagator.

Definition at line 183 of file float.hh.


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