Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

SgRelaxedSearchControl Class Reference

Abort when time limit is reached AND a number of nodes were searched. More...

#include <SgSearchControl.h>

Inheritance diagram for SgRelaxedSearchControl:
Inheritance graph
[legend]

List of all members.

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.
SgRelaxedSearchControloperator= (const SgRelaxedSearchControl &)
 Not implemented.

Private Attributes

double m_maxTime

Detailed Description

Abort when time limit is reached AND a number of nodes were searched.

Definition at line 151 of file SgSearchControl.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
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().


Member Data Documentation

Definition at line 164 of file SgSearchControl.h.

Referenced by Abort().

Definition at line 155 of file SgSearchControl.h.

Referenced by Abort().


The documentation for this class was generated from the following files:


Sun Mar 13 2011 Doxygen 1.7.1