Setting up scripts
[Programming models]
Functions | |
Gecode::Space::Space (void) | |
Default constructor. | |
virtual | Gecode::Space::~Space (void) |
Destructor. | |
Gecode::Space::Space (bool share, Space &s) | |
Constructor for cloning. | |
virtual Space * | Gecode::Space::copy (bool share)=0 |
Copying member function. | |
virtual void | Gecode::Space::constrain (const Space &best) |
Constrain function for best solution search. | |
static void * | Gecode::Space::operator new (size_t) |
Allocate memory from heap for new space. | |
static void | Gecode::Space::operator delete (void *) |
Free memory allocated from heap. |
Detailed Description
Scripts (or models) are programmed by inheriting from the class Gecode::Space. For many examples see Example scripts (models).
Function Documentation
Gecode::Space::Space | ( | void | ) | [inherited] |
Gecode::Space::~Space | ( | void | ) | [virtual, inherited] |
Gecode::Space::Space | ( | bool | share, | |
Space & | s | |||
) | [inherited] |
virtual Space* Gecode::Space::copy | ( | bool | share | ) | [pure virtual, inherited] |
Copying member function.
Must create a new object using the constructor for cloning.
Implemented in Gecode::FlatZinc::FlatZincSpace, Test::AFC::TestSpace, Test::Array::TestSpace, Test::Assign::IntTestSpace, Test::Assign::BoolTestSpace, Test::Assign::SetTestSpace, Test::Branch::IntTestSpace, Test::Branch::BoolTestSpace, Test::Branch::SetTestSpace, Test::Int::Cumulatives::Ass, Test::Int::Distinct::Pathological::TestSpace, Test::Int::TestSpace, Test::Search::FailImmediate, Test::Search::HasSolutions, Test::Set::FakeSpace, and Test::Set::SetTestSpace.
void Gecode::Space::constrain | ( | const Space & | best | ) | [virtual, inherited] |
Constrain function for best solution search.
Must constrain this space to be better than the so far best solution best.
If best solution search is used and this method is not redefined, an exception of type SpaceConstrainUndefined is thrown.
Reimplemented in Gecode::FlatZinc::FlatZincSpace, Gecode::MiniModel::OptimizeSpace< irt >, Test::Search::FailImmediate, and Test::Search::HasSolutions.
void * Gecode::Space::operator new | ( | size_t | s | ) | [inline, static, inherited] |