Abort when time limit is reached AND a number of nodes were searched. More...
#include <SgSearchControl.h>

Public Member Functions | |
| SgRelaxedSearchControl (double maxTime) | |
| virtual | ~SgRelaxedSearchControl () |
| virtual bool | Abort (double elapsedTime, int numNodes) |
| Check if search should be aborted. | |
| virtual bool | StartNextIteration (int depth, double elapsedTime, int numNodes) |
| Check if next iteration should be started. | |
Static Public Attributes | |
| static const int | MIN_NODES_PER_SECOND = 1000 |
Private Member Functions | |
| SgRelaxedSearchControl (const SgRelaxedSearchControl &) | |
| Not implemented. | |
| SgRelaxedSearchControl & | operator= (const SgRelaxedSearchControl &) |
| Not implemented. | |
Private Attributes | |
| double | m_maxTime |
Abort when time limit is reached AND a number of nodes were searched.
Definition at line 151 of file SgSearchControl.h.
| SgRelaxedSearchControl::SgRelaxedSearchControl | ( | double | maxTime | ) |
Definition at line 173 of file SgSearchControl.h.
| SgRelaxedSearchControl::~SgRelaxedSearchControl | ( | ) | [virtual] |
Definition at line 70 of file SgSearchControl.cpp.
| SgRelaxedSearchControl::SgRelaxedSearchControl | ( | const SgRelaxedSearchControl & | ) | [private] |
Not implemented.
| bool SgRelaxedSearchControl::Abort | ( | double | elapsedTime, | |
| int | numNodes | |||
| ) | [virtual] |
Check if search should be aborted.
Called at each node.
Implements SgSearchControl.
Definition at line 74 of file SgSearchControl.cpp.
References m_maxTime, and MIN_NODES_PER_SECOND.
| SgRelaxedSearchControl& SgRelaxedSearchControl::operator= | ( | const SgRelaxedSearchControl & | ) | [private] |
Not implemented.
| bool SgSearchControl::StartNextIteration | ( | int | depth, | |
| double | elapsedTime, | |||
| int | numNodes | |||
| ) | [virtual, inherited] |
Check if next iteration should be started.
Called before each iteration. The default implementation always returns true.
| depth | The depth of the next iteration. | |
| elapsedTime | The elapsed time in seconds. | |
| numNodes | The number of nodes visited. |
Definition at line 15 of file SgSearchControl.cpp.
References SG_UNUSED().
Referenced by SgSearch::IteratedSearch().
double SgRelaxedSearchControl::m_maxTime [private] |
Definition at line 164 of file SgSearchControl.h.
Referenced by Abort().
const int SgRelaxedSearchControl::MIN_NODES_PER_SECOND = 1000 [static] |
Definition at line 155 of file SgSearchControl.h.
Referenced by Abort().