Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgTimeSearchControl Class Reference

#include <SgSearchControl.h>

Inheritance diagram for SgTimeSearchControl:

Inheritance graph
[legend]
List of all members.

Detailed Description

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

Definition at line 54 of file SgSearchControl.h.

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


Constructor & Destructor Documentation

SgTimeSearchControl::SgTimeSearchControl ( double  maxTime  ) 

Definition at line 27 of file SgSearchControl.cpp.

SgTimeSearchControl::~SgTimeSearchControl (  )  [virtual]

Definition at line 32 of file SgSearchControl.cpp.

SgTimeSearchControl::SgTimeSearchControl ( const SgTimeSearchControl  )  [private]

Not implemented.


Member Function Documentation

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

Check if search should be aborted.

Called at each node.

Implements SgSearchControl.

Definition at line 36 of file SgSearchControl.cpp.

References m_maxTime, and SG_UNUSED().

double SgTimeSearchControl::GetMaxTime (  )  const

Definition at line 78 of file SgSearchControl.h.

References m_maxTime.

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

Not implemented.

void SgTimeSearchControl::SetMaxTime ( double  maxTime  ) 

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

References SG_UNUSED().

Referenced by SgSearch::IteratedSearch().


Member Data Documentation

double SgTimeSearchControl::m_maxTime [private]

Definition at line 69 of file SgSearchControl.h.

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


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


17 Jun 2010 Doxygen 1.4.7