Generated on Mon Aug 25 11:35:49 2008 for Gecode by doxygen 1.5.6

Gecode::Space Class Reference

Inherited by Example, Test::Assign::BoolTestSpace, Test::Assign::IntTestSpace, Test::Branch::BoolTestSpace, Test::Branch::CpltSetTestSpace, Test::Branch::IntTestSpace, Test::Branch::SetTestSpace, Test::CpltSet::CpltSetTestSpace, Test::Int::Distinct::Pathological::TestSpace, Test::Int::Scheduling::Ass, Test::Int::TestSpace, Test::Search::TestSpace, and Test::Set::SetTestSpace.

List of all members.


Detailed Description

Computation spaces.

Definition at line 1004 of file core.icc.


Reflection

virtual void getVars (Reflection::VarMap &m, bool registerOnly)
 Enter variables into m.
Reflection::BranchingSpec branchingSpec (Reflection::VarMap &m, const BranchingDesc *d) const
 Get reflection for BranchingDesc d.

Public Member Functions

 Space (void)
 Default constructor.
virtual ~Space (void)
 Destructor.
 Space (bool share, Space &s)
 Constructor for cloning.
virtual Spacecopy (bool share)=0
 Copying member function.
SpaceStatus status (unsigned long int &pn=unused_uli)
 Query space status.
const BranchingDescdescription (void) const
 Create new branching description for current branching.
Spaceclone (bool share=true)
 Clone space.
void commit (const BranchingDesc *d, unsigned int a)
 Commit branching description d and for alternative a.
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 branchings (void) const
 Return number of branchings.
void * alloc (size_t)
 Allocate memory on space heap.
void reuse (void *, size_t)
 Attempt to reuse memory previously allocated with alloc.
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.

Static Public Member Functions

static void * operator new (size_t)
 Allocate memory from heap for new space.
static void operator delete (void *)
 Free memory allocated from heap.

Member Function Documentation

unsigned int Gecode::Space::propagators ( void   )  const

Return number of propagators.

Note that this function takes linear time in the number of propagators.

Definition at line 158 of file core.cc.

unsigned int Gecode::Space::branchings ( void   )  const

Return number of branchings.

Note that this function takes linear time in the number of branchings.

Definition at line 170 of file core.cc.

void Gecode::Space::getVars ( Reflection::VarMap m,
bool  registerOnly 
) [virtual]

Enter variables into m.

Reimplemented in Golf, and Queens.

Definition at line 179 of file core.cc.

Reflection::BranchingSpec Gecode::Space::branchingSpec ( Reflection::VarMap m,
const BranchingDesc d 
) const

Get reflection for BranchingDesc d.

Definition at line 182 of file core.cc.


Member Data Documentation

Cost level with next propagator to be executed.

This maintains the following invariant (but only if the space does not perform propagation):

  • If active points to a queue, this queue might contain a propagator. However, there will be at least one queue containing a propagator.
  • Otherwise, active is smaller than the beginning of the queues. Then, the space is stable.
  • If active is NULL, the space is failed.

Definition at line 1056 of file core.icc.

Scheduled propagators according to cost.

Definition at line 1058 of file core.icc.

Id of next branching to be created.

Definition at line 1060 of file core.icc.

unsigned int Gecode::Space::n_sub

Number of subscriptions.

Definition at line 1062 of file core.icc.

struct { ... } Gecode::Space::p

Data only available during propagation.

Reimplemented in StressElement, and TSP.

Entries for updating variables.

Definition at line 1067 of file core.icc.

Keep variables during copying without index structure.

Definition at line 1069 of file core.icc.

Linked list of shared objects.

Definition at line 1071 of file core.icc.

struct { ... } Gecode::Space::c

Data available only during copying.


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