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

SgTimeSearchControl Class Reference

Example of a simple search abort class: abort when time has expired. More...

#include <SgSearchControl.h>

Inheritance diagram for SgTimeSearchControl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SgTimeSearchControl (double maxTime)
virtual ~SgTimeSearchControl ()
virtual bool Abort (double elapsedTime, int ignoreNumNodes)
 Check if search should be aborted.
double GetMaxTime () const
void SetMaxTime (double maxTime)
virtual bool StartNextIteration (int depth, double elapsedTime, int numNodes)
 Check if next iteration should be started.

Private Member Functions

 SgTimeSearchControl (const SgTimeSearchControl &)
 Not implemented.
SgTimeSearchControloperator= (const SgTimeSearchControl &)
 Not implemented.

Private Attributes

double m_maxTime

Detailed Description

Example of a simple search abort class: abort when time has expired.

Definition at line 51 of file SgSearchControl.h.


Constructor & Destructor Documentation

SgTimeSearchControl::SgTimeSearchControl ( double  maxTime  ) 

Definition at line 26 of file SgSearchControl.cpp.

SgTimeSearchControl::~SgTimeSearchControl (  )  [virtual]

Definition at line 31 of file SgSearchControl.cpp.

SgTimeSearchControl::SgTimeSearchControl ( const SgTimeSearchControl  )  [private]

Not implemented.


Member Function Documentation

bool SgTimeSearchControl::Abort ( double  elapsedTime,
int  numNodes 
) [virtual]

Check if search should be aborted.

Called at each node.

Implements SgSearchControl.

Definition at line 35 of file SgSearchControl.cpp.

References m_maxTime, and SG_UNUSED().

double SgTimeSearchControl::GetMaxTime (  )  const

Definition at line 75 of file SgSearchControl.h.

References m_maxTime.

SgTimeSearchControl& SgTimeSearchControl::operator= ( const SgTimeSearchControl  )  [private]

Not implemented.

void SgTimeSearchControl::SetMaxTime ( double  maxTime  ) 

Definition at line 80 of file SgSearchControl.h.

References m_maxTime.

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 66 of file SgSearchControl.h.

Referenced by Abort(), GetMaxTime(), and SetMaxTime().


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


Sun Mar 13 2011 Doxygen 1.7.1