Generated on Thu Jan 31 2019 20:56:56 for Gecode by doxygen 1.8.15

Space for executing set tests. More...

#include <set.hh>

Public Member Functions

 SetTestSpace (int n, Gecode::IntSet &d0, int i, SetTest *t, bool log=true)
 Create test space without reification. More...
 
 SetTestSpace (int n, Gecode::IntSet &d0, int i, SetTest *t, Gecode::ReifyMode rm, bool log=true)
 Create test space with reification. More...
 
 SetTestSpace (bool share, SetTestSpace &s)
 Constructor for cloning s. More...
 
virtual Gecode::Spacecopy (bool share)
 Copy space during cloning. More...
 
void post (void)
 Post propagator. More...
 
bool failed (void)
 Compute a fixpoint and check for failure. More...
 
bool subsumed (bool b)
 Check for subsumption if b is true. More...
 
void rel (int i, Gecode::SetRelType srt, const Gecode::IntSet &is)
 Perform set tell operation on x[i]. More...
 
void cardinality (int i, int cmin, int cmax)
 Perform cardinality tell operation on x[i]. More...
 
void rel (int i, Gecode::IntRelType irt, int n)
 Perform integer tell operation on y[i]. More...
 
void rel (bool sol)
 Perform Boolean tell on b. More...
 
void assign (const SetAssignment &a)
 Assign all variables to values in a. More...
 
bool assigned (void) const
 Test whether all variables are assigned. More...
 
void removeFromLub (int v, int i, const SetAssignment &a)
 Remove value v from the upper bound of x[i]. More...
 
void removeFromLub (int v, int i, const SetAssignment &a, SetTestSpace &c)
 Remove value v from the upper bound of x[i]. More...
 
void addToGlb (int v, int i, const SetAssignment &a)
 Remove value v from the lower bound of x[i]. More...
 
void addToGlb (int v, int i, const SetAssignment &a, SetTestSpace &c)
 Remove value v from the lower bound of x[i]. More...
 
bool fixprob (void)
 Perform fixpoint computation. More...
 
bool prune (const SetAssignment &a)
 Perform random pruning. More...
 
unsigned int propagators (void)
 Return the number of propagators. More...
 
void disable (void)
 Disable propagators in space and compute fixpoint (make all idle) More...
 
void enable (void)
 Enable propagators in space. More...
 
bool disabled (const SetAssignment &a, SetTestSpace &c)
 Prune values also in a space c with disabled propagators, but not those in assignment a. More...
 
bool same (SetTestSpace &c)
 Check whether propagation is the same as in c. More...
 
- Public Member Functions inherited from Gecode::Space
 Space (void)
 Default constructor. More...
 
 Space (bool share, Space &s)
 Constructor for cloning. More...
 
virtual ~Space (void)
 Destructor. More...
 
virtual void constrain (const Space &best)
 Constrain function for best solution search. More...
 
virtual bool master (const MetaInfo &mi)
 Master configuration function for meta search engines. More...
 
virtual bool slave (const MetaInfo &mi)
 Slave configuration function for meta search engines. 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_data=true, bool share_info=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...
 
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...
 
Home operator() (PropagatorGroup pg)
 Return a home for this space with propagator group information pg. More...
 
Home operator() (BrancherGroup bg)
 Return a home for this space with brancher group information bg. 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...
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management. More...
 
static void operator delete (void *p)
 Free memory allocated from heap. More...
 

Detailed Description

Space for executing set tests.

Definition at line 198 of file set.hh.

Constructor & Destructor Documentation

◆ SetTestSpace() [1/3]

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.

◆ SetTestSpace() [2/3]

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.

◆ SetTestSpace() [3/3]

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

Constructor for cloning s.

Definition at line 157 of file set.cpp.

Member Function Documentation

◆ copy()

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

Copy space during cloning.

Implements Gecode::Space.

Definition at line 169 of file set.cpp.

◆ post()

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

Post propagator.

Definition at line 174 of file set.cpp.

◆ failed()

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

Compute a fixpoint and check for failure.

Definition at line 187 of file set.cpp.

◆ subsumed()

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

Check for subsumption if b is true.

Definition at line 201 of file set.cpp.

◆ rel() [1/3]

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.

◆ cardinality()

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.

◆ rel() [2/3]

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.

◆ rel() [3/3]

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

Perform Boolean tell on b.

Definition at line 253 of file set.cpp.

◆ assign()

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

Assign all variables to values in a.

Definition at line 262 of file set.cpp.

◆ assigned()

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

Test whether all variables are assigned.

Definition at line 278 of file set.cpp.

◆ removeFromLub() [1/2]

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.

◆ removeFromLub() [2/2]

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.

◆ addToGlb() [1/2]

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.

◆ addToGlb() [2/2]

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.

◆ fixprob()

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

Perform fixpoint computation.

Definition at line 345 of file set.cpp.

◆ prune()

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

Perform random pruning.

Definition at line 409 of file set.cpp.

◆ propagators()

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

Return the number of propagators.

Definition at line 689 of file set.cpp.

◆ disable()

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

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

Definition at line 699 of file set.cpp.

◆ enable()

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

Enable propagators in space.

Definition at line 694 of file set.cpp.

◆ disabled()

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.

◆ same()

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

◆ d

Gecode::IntSet Test::Set::SetTestSpace::d

Initial domain.

Definition at line 201 of file set.hh.

◆ x

Gecode::SetVarArray Test::Set::SetTestSpace::x

Set variables to be tested.

Definition at line 203 of file set.hh.

◆ y

Gecode::IntVarArray Test::Set::SetTestSpace::y

Int variables to be tested.

Definition at line 205 of file set.hh.

◆ withInt

int Test::Set::SetTestSpace::withInt

How many integer variables are used by the test.

Definition at line 207 of file set.hh.

◆ r

Gecode::Reify Test::Set::SetTestSpace::r

Reification information.

Definition at line 209 of file set.hh.

◆ reified

bool Test::Set::SetTestSpace::reified

Whether the test is for a reified propagator.

Definition at line 211 of file set.hh.

◆ test

SetTest* Test::Set::SetTestSpace::test

The test currently run.

Definition at line 213 of file set.hh.


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