Gecode::Space Class Reference
Inherited by Example.Detailed Description
Computation spaces.
Definition at line 576 of file core.icc.
Public Member Functions | |
Space (void) | |
Default constructor. | |
virtual | ~Space (void) |
Destructor. | |
Space (bool share, Space &s) | |
Constructor for cloning. | |
virtual Space * | copy (bool share)=0 |
Copying member function. | |
SpaceStatus | status (unsigned int &a=unused_ui, unsigned long int &pn=unused_uli) |
Query space status. | |
Space * | clone (bool share=true, unsigned long int &pn=unused_uli) |
Clone space. | |
void | commit (unsigned int a, BranchingDesc *d=NULL, unsigned long int &pn=unused_uli) |
Commit space to alternative. | |
BranchingDesc * | description (void) const |
Get branching description for current branching. | |
void | flush (void) |
Flush cache datastructures in actors. | |
void | fail (void) |
Fail space. | |
bool | failed (void) const |
Check whether space is failed. | |
bool | actors (void) const |
Check whether space has actors left. | |
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 by this space. | |
size_t | cached (void) const |
Return how much memory is used by caches for actors. | |
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
bool Gecode::Space::actors | ( | void | ) | const [inline] |
unsigned int Gecode::Space::propagators | ( | void | ) | const |
Return number of propagators.
Note that this function takes linear time in the number of propagators. The number is only accurate when the space is stable (that is, at fixpoint and all propagation is done).
Throws an exception of type SpaceFailed, if the space is failed.
unsigned int Gecode::Space::branchings | ( | void | ) | const |
Return number of branchings.
Note that this function takes linear time in the number of branchings.
Throws an exception of type SpaceFailed, if the space is failed.
The documentation for this class was generated from the following files:
- gecode/kernel/core.icc (Revision: 3269)
- gecode/kernel/core.cc (Revision: 3259)