Search engine implementation interface More...
#include <gecode/search.hh>
Public Member Functions | |
| virtual Space * | next (void)=0 |
| Return next solution (nullptr, if none exists or search has been stopped). | |
| virtual Statistics | statistics (void) const =0 |
| Return statistics. | |
| virtual bool | stopped (void) const =0 |
| Check whether engine has been stopped. | |
| virtual bool | limited (void) const |
| Whether the engine stopped at a local limit (such as a CABS width limit) and cannot continue. | |
| virtual void | constrain (const Space &b) |
| Constrain future solutions to be better than b (raises exception). | |
| virtual void | reset (Space *s) |
| Reset engine to restart at space s (does nothing). | |
| virtual NoGoods & | nogoods (void) |
| Return no-goods (the no-goods are empty). | |
| virtual | ~Engine (void) |
| Destructor. | |
Protected Member Functions | |
| Engine (void) | |
| Construct a meta engine without worker control. | |
| Engine (const Options &o, unsigned int capacity) | |
| Construct a leaf engine and bind worker control to capacity. | |
Protected Attributes | |
| WorkerControl | worker_control |
| Control retained for the lifetime of a leaf engine. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Gecode::HeapAllocated | |
| static void * | operator new (size_t s) |
| Memory management. | |
| static void | operator delete (void *p) |
| Free memory allocated from heap. | |
Detailed Description
Constructor & Destructor Documentation
◆ Engine() [1/2]
|
protected |
Construct a meta engine without worker control.
Definition at line 39 of file engine.cpp.
◆ Engine() [2/2]
|
protected |
Construct a leaf engine and bind worker control to capacity.
Definition at line 42 of file engine.cpp.
◆ ~Engine()
|
virtual |
Destructor.
Reimplemented in Gecode::Search::Par::Engine< Tracer >.
Definition at line 68 of file engine.cpp.
Member Function Documentation
◆ next()
|
pure virtual |
Return next solution (nullptr, if none exists or search has been stopped).
Implemented in Gecode::Search::Par::Engine< Tracer >, Gecode::Search::Par::Frontier, Gecode::Search::Par::PBS< Collect >, Gecode::Search::Par::PBS< Gecode::Search::Par::CollectBest >, Gecode::Search::Seq::Dead< Tracer >, Gecode::Search::Seq::LDS< Tracer >, Gecode::Search::Seq::PBS< best >, Gecode::Search::Seq::RBS, Gecode::Search::WorkerToEngine< Worker >, and Gecode::Search::WorkerToEngine< CABS >.
◆ statistics()
|
pure virtual |
Return statistics.
Implemented in Gecode::Search::Par::BAB< Tracer >, Gecode::Search::Par::DFS< Tracer >, Gecode::Search::Par::Frontier, Gecode::Search::Par::PBS< Collect >, Gecode::Search::Par::PBS< Gecode::Search::Par::CollectBest >, Gecode::Search::Seq::Dead< Tracer >, Gecode::Search::Seq::LDS< Tracer >, Gecode::Search::Seq::PBS< best >, Gecode::Search::Seq::RBS, Gecode::Search::WorkerToEngine< Worker >, and Gecode::Search::WorkerToEngine< CABS >.
◆ stopped()
|
pure virtual |
Check whether engine has been stopped.
Implemented in Gecode::Search::Par::Engine< Tracer >, Gecode::Search::Par::Frontier, Gecode::Search::Par::PBS< Collect >, Gecode::Search::Par::PBS< Gecode::Search::Par::CollectBest >, Gecode::Search::Seq::Dead< Tracer >, Gecode::Search::Seq::LDS< Tracer >, Gecode::Search::Seq::PBS< best >, Gecode::Search::Seq::RBS, Gecode::Search::WorkerToEngine< Worker >, and Gecode::Search::WorkerToEngine< CABS >.
◆ limited()
|
virtual |
Whether the engine stopped at a local limit (such as a CABS width limit) and cannot continue.
Reimplemented in Gecode::Search::Par::Frontier, and Gecode::Search::Seq::CABSEngine.
Definition at line 54 of file engine.cpp.
◆ constrain()
|
virtual |
Constrain future solutions to be better than b (raises exception).
Reimplemented in Gecode::Search::Par::BAB< Tracer >, Gecode::Search::Par::Frontier, Gecode::Search::Par::PBS< Collect >, Gecode::Search::Par::PBS< Gecode::Search::Par::CollectBest >, Gecode::Search::Seq::LDS< Tracer >, Gecode::Search::Seq::PBS< best >, Gecode::Search::Seq::RBS, Gecode::Search::WorkerToEngine< Worker >, and Gecode::Search::WorkerToEngine< CABS >.
Definition at line 48 of file engine.cpp.
◆ reset()
|
virtual |
Reset engine to restart at space s (does nothing).
Reimplemented in Gecode::Search::Par::BAB< Tracer >, Gecode::Search::Par::DFS< Tracer >, Gecode::Search::Par::Frontier, Gecode::Search::Seq::LDS< Tracer >, Gecode::Search::WorkerToEngine< Worker >, and Gecode::Search::WorkerToEngine< CABS >.
Definition at line 60 of file engine.cpp.
◆ nogoods()
|
virtual |
Return no-goods (the no-goods are empty).
Reimplemented in Gecode::Search::Par::BAB< Tracer >, Gecode::Search::Par::DFS< Tracer >, Gecode::Search::WorkerToEngine< Worker >, and Gecode::Search::WorkerToEngine< CABS >.
Definition at line 64 of file engine.cpp.
Member Data Documentation
◆ worker_control
|
protected |
The documentation for this class was generated from the following files:
- gecode/search.hh
- gecode/search/engine.cpp
