Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgRelaxedSearchControl Class Reference

#include <SgSearchControl.h>

Inheritance diagram for SgRelaxedSearchControl:

Inheritance graph
[legend]
List of all members.

Detailed Description

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

Definition at line 155 of file 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.
SgRelaxedSearchControloperator= (const SgRelaxedSearchControl &)
 Not implemented.

Private Attributes

double m_maxTime


Constructor & Destructor Documentation

SgRelaxedSearchControl::SgRelaxedSearchControl ( double  maxTime  ) 

Definition at line 177 of file SgSearchControl.h.

SgRelaxedSearchControl::~SgRelaxedSearchControl (  )  [virtual]

Definition at line 71 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 75 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 16 of file SgSearchControl.cpp.

References SG_UNUSED().

Referenced by SgSearch::IteratedSearch().


Member Data Documentation

double SgRelaxedSearchControl::m_maxTime [private]

Definition at line 168 of file SgSearchControl.h.

Referenced by Abort().

const int SgRelaxedSearchControl::MIN_NODES_PER_SECOND = 1000 [static]

Definition at line 159 of file SgSearchControl.h.

Referenced by Abort().


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


17 Jun 2010 Doxygen 1.4.7