Gecode::Restart< T > Class Template Reference
[Search engines]
#include <search.hh>
Inherits Gecode::DFS< T >< T >.
Detailed Description
template<class T>
class Gecode::Restart< T >
Depth-first restart best solution search engine.
Definition at line 648 of file search.hh.
Public Member Functions | |
Restart (T *s, unsigned int c_d=Search::Config::c_d, unsigned int a_d=Search::Config::a_d, Search::Stop *st=NULL) | |
Initialize engine. | |
~Restart (void) | |
Destructor. | |
T * | next (void) |
Return next better solution (NULL, if none exists or search has been stopped). | |
Protected Attributes | |
Space * | root |
Root node. | |
Space * | best |
So-far best solution. |
Constructor & Destructor Documentation
template<class T>
Gecode::Restart< T >::Restart | ( | T * | s, | |
unsigned int | c_d = Search::Config::c_d , |
|||
unsigned int | a_d = Search::Config::a_d , |
|||
Search::Stop * | st = NULL | |||
) |
Initialize engine.
- Parameters:
-
s root node (subclass T of Space). Additionally, s must implement a member function Whenever exploration requires to add a constraint to the space c currently being explored, the engine executesvoid constrain(T* t)
c->constrain(t)
where t is the so-far best solution.c_d minimal recomputation distance a_d adaptive recomputation distance st Stop-object
Definition at line 30 of file restart.icc.
template<class T>
Gecode::Restart< T >::~Restart | ( | void | ) | [inline] |
Member Function Documentation
template<class T>
T * Gecode::Restart< T >::next | ( | void | ) | [inline] |
Return next better solution (NULL, if none exists or search has been stopped).
Reimplemented from Gecode::DFS< T >.
Definition at line 43 of file restart.icc.
Member Data Documentation
template<class T>
Space* Gecode::Restart< T >::root [protected] |
template<class T>
Space* Gecode::Restart< T >::best [protected] |
The documentation for this class was generated from the following files:
- gecode/search.hh (Revision: 3226)
- gecode/search/restart.icc (Revision: 3142)