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

SgSearchStatistics Class Reference

Statistics used in class SgSearch. More...

#include <SgSearchStatistics.h>

List of all members.

Public Member Functions

 SgSearchStatistics ()
 SgSearchStatistics (const SgSearchStatistics &stat)
virtual ~SgSearchStatistics ()
SgSearchStatisticsoperator= (const SgSearchStatistics &rhs)
SgSearchStatisticsoperator+= (const SgSearchStatistics &rhs)
void Clear ()
 Set the number of nodes and leafs searched to zero.
int DepthReached () const
virtual SgSearchStatisticsDuplicate () const
void IncNumEvals ()
void IncNumMoves ()
void IncNumNodes ()
void IncNumPassMoves ()
int NumEvals () const
int NumMoves () const
int NumNodes () const
double NumEvalsPerSecond () const
double NumNodesPerSecond () const
int NumPassMoves () const
void SetDepthReached (int depthReached)
void SetTimeUsed (double timeUsed)
 Set the time used to the given value.
double TimeUsed () const

Private Attributes

int m_numNodes
int m_numEvals
int m_numMoves
int m_numPass
int m_depthReached
double m_timeUsed

Detailed Description

Statistics used in class SgSearch.

Definition at line 14 of file SgSearchStatistics.h.


Constructor & Destructor Documentation

SgSearchStatistics::SgSearchStatistics (  ) 

Definition at line 15 of file SgSearchStatistics.cpp.

References Clear().

Referenced by Duplicate().

SgSearchStatistics::SgSearchStatistics ( const SgSearchStatistics stat  ) 

Definition at line 20 of file SgSearchStatistics.cpp.

SgSearchStatistics::~SgSearchStatistics (  )  [virtual]

Definition at line 30 of file SgSearchStatistics.cpp.


Member Function Documentation

void SgSearchStatistics::Clear (  ) 

Set the number of nodes and leafs searched to zero.

Definition at line 64 of file SgSearchStatistics.cpp.

References m_depthReached, m_numEvals, m_numMoves, m_numNodes, m_numPass, and m_timeUsed.

Referenced by SgSearchStatistics(), and SgSearch::StartTime().

int SgSearchStatistics::DepthReached (  )  const

Definition at line 81 of file SgSearchStatistics.h.

References m_depthReached.

Referenced by operator<<().

SgSearchStatistics * SgSearchStatistics::Duplicate (  )  const [virtual]

Definition at line 74 of file SgSearchStatistics.cpp.

References SgSearchStatistics().

void SgSearchStatistics::IncNumEvals (  ) 

Definition at line 86 of file SgSearchStatistics.h.

References m_numEvals.

Referenced by SgSearch::SearchEngine().

void SgSearchStatistics::IncNumMoves (  ) 

Definition at line 91 of file SgSearchStatistics.h.

References m_numMoves.

Referenced by SgSearch::CallExecute().

void SgSearchStatistics::IncNumNodes (  ) 

Definition at line 96 of file SgSearchStatistics.h.

References m_numNodes.

Referenced by SgSearch::SearchEngine().

void SgSearchStatistics::IncNumPassMoves (  ) 

Definition at line 101 of file SgSearchStatistics.h.

References m_numPass.

Referenced by SgSearch::CallExecute().

int SgSearchStatistics::NumEvals (  )  const

Definition at line 106 of file SgSearchStatistics.h.

References m_numEvals.

Referenced by operator<<().

double SgSearchStatistics::NumEvalsPerSecond (  )  const

Definition at line 87 of file SgSearchStatistics.cpp.

References m_numEvals, and TimeUsed().

Referenced by operator<<().

int SgSearchStatistics::NumMoves (  )  const

Definition at line 111 of file SgSearchStatistics.h.

References m_numMoves.

int SgSearchStatistics::NumNodes (  )  const

Definition at line 116 of file SgSearchStatistics.h.

References m_numNodes.

Referenced by SgSearch::AbortSearch(), SgSearch::IteratedSearch(), and operator<<().

double SgSearchStatistics::NumNodesPerSecond (  )  const

Definition at line 79 of file SgSearchStatistics.cpp.

References m_numNodes, and TimeUsed().

Referenced by operator<<().

int SgSearchStatistics::NumPassMoves (  )  const

Definition at line 121 of file SgSearchStatistics.h.

References m_numPass.

SgSearchStatistics & SgSearchStatistics::operator+= ( const SgSearchStatistics rhs  ) 

Definition at line 50 of file SgSearchStatistics.cpp.

References m_depthReached, m_numEvals, m_numMoves, m_numNodes, m_numPass, and m_timeUsed.

SgSearchStatistics & SgSearchStatistics::operator= ( const SgSearchStatistics rhs  ) 

Definition at line 35 of file SgSearchStatistics.cpp.

References m_depthReached, m_numEvals, m_numMoves, m_numNodes, m_numPass, and m_timeUsed.

void SgSearchStatistics::SetDepthReached ( int  depthReached  ) 

Definition at line 126 of file SgSearchStatistics.h.

References m_depthReached.

Referenced by SgSearch::IteratedSearch().

void SgSearchStatistics::SetTimeUsed ( double  timeUsed  ) 

Set the time used to the given value.

Only needed because doesn't keep track of real time used, and some searches might want to report the real time rather than the thread time.

Definition at line 131 of file SgSearchStatistics.h.

References m_timeUsed.

Referenced by SgSearch::GetStatistics().

double SgSearchStatistics::TimeUsed (  )  const

Definition at line 136 of file SgSearchStatistics.h.

References m_timeUsed.

Referenced by NumEvalsPerSecond(), NumNodesPerSecond(), and operator<<().


Member Data Documentation

Definition at line 73 of file SgSearchStatistics.h.

Referenced by Clear(), DepthReached(), operator+=(), operator=(), and SetDepthReached().

Definition at line 69 of file SgSearchStatistics.h.

Referenced by Clear(), IncNumMoves(), NumMoves(), operator+=(), and operator=().

Definition at line 71 of file SgSearchStatistics.h.

Referenced by Clear(), IncNumPassMoves(), NumPassMoves(), operator+=(), and operator=().

Definition at line 75 of file SgSearchStatistics.h.

Referenced by Clear(), operator+=(), operator=(), SetTimeUsed(), and TimeUsed().


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


Sun Mar 13 2011 Doxygen 1.7.1