Combines a hash table and a position database. More...
#include <SolverDB.hpp>
Public Member Functions | |
SolverDB (boost::scoped_ptr< HASH > &hashTable, boost::scoped_ptr< DB > &database, const SolverDBParameters ¶m) | |
~SolverDB () | |
bool | Get (const HexState &state, DATA &data) |
void | Put (const HexState &state, const DATA &data) |
HASH * | HashTable () |
DB * | Database () |
const SolverDBParameters & | Parameters () const |
SolverDBParameters & | Parameters () |
void | SetParameters (const SolverDBParameters ¶m) |
Private Member Functions | |
bool | UseDatabase () const |
bool | UseHashTable () const |
Private Attributes | |
boost::scoped_ptr< HASH > & | m_hashTable |
boost::scoped_ptr< DB > & | m_database |
SolverDBParameters | m_param |
Combines a hash table and a position database.
Definition at line 46 of file SolverDB.hpp.
SolverDB< HASH, DB, DATA >::SolverDB | ( | boost::scoped_ptr< HASH > & | hashTable, | |
boost::scoped_ptr< DB > & | database, | |||
const SolverDBParameters & | param | |||
) | [inline] |
Definition at line 85 of file SolverDB.hpp.
Definition at line 95 of file SolverDB.hpp.
DB * SolverDB< HASH, DB, DATA >::Database | ( | ) | [inline] |
Definition at line 107 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_database.
Referenced by DfsSolver::DumpStats(), and DfpnSolver::PrintStatistics().
bool SolverDB< HASH, DB, DATA >::Get | ( | const HexState & | state, | |
DATA & | data | |||
) | [inline] |
Definition at line 143 of file SolverDB.hpp.
References HexState::Hash(), SolverDB< HASH, DB, DATA >::m_database, SolverDB< HASH, DB, DATA >::m_hashTable, SolverDBParameters::m_maxStones, SolverDB< HASH, DB, DATA >::m_param, StoneBoard::NumStones(), HexState::Position(), SolverDB< HASH, DB, DATA >::UseDatabase(), and SolverDB< HASH, DB, DATA >::UseHashTable().
Referenced by DfsSolver::CheckTransposition(), DfpnCommands::CmdGetBounds(), DfsCommands::CmdGetState(), DfpnCommands::CmdGetState(), DfpnCommands::CmdGetWork(), SolverDBUtil::GetVariation(), DfpnSolver::PropagateBackwards(), PerfectPlayer::Search(), and DfpnSolver::TTRead().
HASH * SolverDB< HASH, DB, DATA >::HashTable | ( | ) | [inline] |
Definition at line 101 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_hashTable.
Referenced by DfsSolver::DumpStats(), and DfpnSolver::PrintStatistics().
SolverDBParameters & SolverDB< HASH, DB, DATA >::Parameters | ( | ) | [inline] |
Definition at line 119 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_param.
const SolverDBParameters & SolverDB< HASH, DB, DATA >::Parameters | ( | ) | const [inline] |
Definition at line 113 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_param.
Referenced by DfsCommands::CmdParamSolverDB(), DfpnCommands::CmdParamSolverDB(), and DfsSolver::StoreState().
void SolverDB< HASH, DB, DATA >::Put | ( | const HexState & | state, | |
const DATA & | data | |||
) | [inline] |
Definition at line 153 of file SolverDB.hpp.
References HexState::Hash(), SolverDB< HASH, DB, DATA >::m_database, SolverDB< HASH, DB, DATA >::m_hashTable, SolverDBParameters::m_maxStones, SolverDB< HASH, DB, DATA >::m_param, StoneBoard::NumStones(), HexState::Position(), SolverDB< HASH, DB, DATA >::UseDatabase(), and SolverDB< HASH, DB, DATA >::UseHashTable().
Referenced by DfpnSolver::PropagateBackwards(), ProofUtil::StoreFlippedStates(), DfsSolver::StoreState(), ProofUtil::StoreTranspositions(), and DfpnSolver::TTWrite().
void SolverDB< HASH, DB, DATA >::SetParameters | ( | const SolverDBParameters & | param | ) | [inline] |
Definition at line 125 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_param.
bool SolverDB< HASH, DB, DATA >::UseDatabase | ( | ) | const [inline, private] |
Definition at line 131 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_database.
Referenced by SolverDB< HASH, DB, DATA >::Get(), and SolverDB< HASH, DB, DATA >::Put().
bool SolverDB< HASH, DB, DATA >::UseHashTable | ( | ) | const [inline, private] |
Definition at line 137 of file SolverDB.hpp.
References SolverDB< HASH, DB, DATA >::m_hashTable.
Referenced by SolverDB< HASH, DB, DATA >::Get(), and SolverDB< HASH, DB, DATA >::Put().
boost::scoped_ptr<DB>& SolverDB< HASH, DB, DATA >::m_database [private] |
Definition at line 72 of file SolverDB.hpp.
Referenced by SolverDB< HASH, DB, DATA >::Database(), SolverDB< HASH, DB, DATA >::Get(), SolverDB< HASH, DB, DATA >::Put(), and SolverDB< HASH, DB, DATA >::UseDatabase().
boost::scoped_ptr<HASH>& SolverDB< HASH, DB, DATA >::m_hashTable [private] |
Definition at line 70 of file SolverDB.hpp.
Referenced by SolverDB< HASH, DB, DATA >::Get(), SolverDB< HASH, DB, DATA >::HashTable(), SolverDB< HASH, DB, DATA >::Put(), and SolverDB< HASH, DB, DATA >::UseHashTable().
SolverDBParameters SolverDB< HASH, DB, DATA >::m_param [private] |
Definition at line 74 of file SolverDB.hpp.
Referenced by SolverDB< HASH, DB, DATA >::Get(), SolverDB< HASH, DB, DATA >::Parameters(), SolverDB< HASH, DB, DATA >::Put(), and SolverDB< HASH, DB, DATA >::SetParameters().