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. | |
virtual void | Gecode::Space::master (unsigned long int i, const Space *s, NoGoods &ng) |
Master configuration function for restart meta search engine. | |
virtual void | Gecode::Space::slave (unsigned long int i, const Space *s) |
Slave configuration function for restart meta search engine. | |
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. |
Scripts (or models) are programmed by inheriting from the class Gecode::Space. For many examples see Example scripts (models).
Gecode::Space::Space | ( | void | ) |
Gecode::Space::~Space | ( | void | ) | [virtual] |
Gecode::Space::Space | ( | bool | share, |
Space & | s | ||
) |
virtual Space* Gecode::Space::copy | ( | bool | share | ) | [pure virtual] |
Copying member function.
Must create a new object using the constructor for cloning.
Implemented in Test::LDSB::LDSBLatin::Latin, Gecode::FlatZinc::FlatZincSpace, Test::Set::SetTestSpace, Test::Float::TestSpace, Test::Search::HasSolutions, Test::Array::TestSpace, Test::Int::TestSpace, Test::LDSB::OneArraySet, Test::NoGoods::Hamming, Test::Int::Distinct::Pathological::TestSpace, Test::LDSB::OneArray, Test::Branch::FloatTestSpace, Test::Search::SolveImmediate, Test::Branch::SetTestSpace, Test::Assign::FloatTestSpace, Test::Branch::BoolTestSpace, Test::Search::FailImmediate, Test::Assign::SetTestSpace, Test::NoGoods::Queens, Test::Branch::IntTestSpace, Test::Int::Cumulatives::Ass, Test::Assign::BoolTestSpace, Test::AFC::TestSpace, Test::BrancherHandle::TestSpace, Test::Set::FakeSpace, and Test::Assign::IntTestSpace.
void Gecode::Space::constrain | ( | const Space & | best | ) | [virtual] |
Constrain function for best solution search.
Must constrain this space to be better than the so far best solution best.
The default function does nothing.
Reimplemented in Gecode::MiniModel::FloatOptimizeSpace< frt >, Gecode::MiniModel::IntOptimizeSpace< irt >, Gecode::FlatZinc::FlatZincSpace, Test::Search::HasSolutions, Test::Search::SolveImmediate, and Test::Search::FailImmediate.
void Gecode::Space::master | ( | unsigned long int | i, |
const Space * | s, | ||
NoGoods & | ng | ||
) | [virtual] |
Master configuration function for restart meta search engine.
A restart meta search engine calls this function on its master space whenever it finds a solution or exploration restarts. i is the number of the restart. s is either the solution space or NULL. ng are nogoods recorded from the last restart (only if s is not a solution).
The default function does nothing.
Reimplemented in Test::Search::HasSolutions.
void Gecode::Space::slave | ( | unsigned long int | i, |
const Space * | s | ||
) | [virtual] |
Slave configuration function for restart meta search engine.
A restart meta search engine calls this function on its slave space whenever it finds a solution or exploration restarts. i is the number of the restart. s is either the solution space or NULL.
The default function does nothing.
void * Gecode::Space::operator new | ( | size_t | s | ) | [inline, static] |