Statistics used in class SgSearch. More...
#include <SgSearchStatistics.h>
Public Member Functions | |
SgSearchStatistics () | |
SgSearchStatistics (const SgSearchStatistics &stat) | |
virtual | ~SgSearchStatistics () |
SgSearchStatistics & | operator= (const SgSearchStatistics &rhs) |
SgSearchStatistics & | operator+= (const SgSearchStatistics &rhs) |
void | Clear () |
Set the number of nodes and leafs searched to zero. | |
int | DepthReached () const |
virtual SgSearchStatistics * | Duplicate () 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 |
Statistics used in class SgSearch.
Definition at line 14 of file SgSearchStatistics.h.
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.
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<<().
int SgSearchStatistics::m_depthReached [private] |
Definition at line 73 of file SgSearchStatistics.h.
Referenced by Clear(), DepthReached(), operator+=(), operator=(), and SetDepthReached().
int SgSearchStatistics::m_numEvals [private] |
Definition at line 67 of file SgSearchStatistics.h.
Referenced by Clear(), IncNumEvals(), NumEvals(), NumEvalsPerSecond(), operator+=(), and operator=().
int SgSearchStatistics::m_numMoves [private] |
Definition at line 69 of file SgSearchStatistics.h.
Referenced by Clear(), IncNumMoves(), NumMoves(), operator+=(), and operator=().
int SgSearchStatistics::m_numNodes [private] |
Definition at line 65 of file SgSearchStatistics.h.
Referenced by Clear(), IncNumNodes(), NumNodes(), NumNodesPerSecond(), operator+=(), and operator=().
int SgSearchStatistics::m_numPass [private] |
Definition at line 71 of file SgSearchStatistics.h.
Referenced by Clear(), IncNumPassMoves(), NumPassMoves(), operator+=(), and operator=().
double SgSearchStatistics::m_timeUsed [private] |
Definition at line 75 of file SgSearchStatistics.h.
Referenced by Clear(), operator+=(), operator=(), SetTimeUsed(), and TimeUsed().