A table to hold ntesukiRecord. [詳細]
#include <ntesukiTable.h>
構成 | |
| struct | HashPathEncoding |
| class | Table |
Public 型 | |
| typedef NtesukiRecord | record_t |
| typedef hash_set< PathEncoding, HashPathEncoding > | PathSet |
Public メソッド | |
| NtesukiTable (unsigned int capacity, unsigned int default_gc_size=0, bool verbose=false) | |
| ~NtesukiTable () | |
| void | clear () |
| Table::const_iterator | begin () const |
| Table::const_iterator | end () const |
| NtesukiRecord * | allocateRoot (const HashKey &key, const PieceStand &white_stand, signed short distance, const NumEffectState *root_state=NULL) |
| テーブルをひく. | |
| NtesukiRecord * | allocateWithMove (NtesukiRecord *record, const NtesukiMove &move) |
| NtesukiRecord * | find (const HashKey &key) |
| テーブルの大きさを変化させずに find する. | |
| const NtesukiRecord * | find (const HashKey &key) const |
| void | erase (const HashKey key) |
| 表に登録された要素を削除する. | |
| void | collectGarbage (unsigned int gc_size) |
| 表を整理する. | |
| NtesukiRecord * | findWithMove (NtesukiRecord *record, const NtesukiMove &move) |
| 与えられた | |
| NtesukiRecord * | findWithMoveConst (const NtesukiRecord *record, const NtesukiMove &move) |
| template<class F > | |
| void | forEachRecord (F &f) |
| テーブルに登録された各 record を F で処理する. | |
| template<class F > | |
| void | forEachRecordFromRoot (F &f) |
| テーブルを root node から順番に調べる. | |
| unsigned int | size () const |
| テーブルに登録された record の数. | |
| unsigned int | capacity () const |
| void | lockGC () |
| void | unlockGC () |
| bool | isVerbose () const |
Public 変数 | |
| std::vector< int > | depths |
Private 型 | |
| typedef hash_map< SignatureKey, NtesukiRecord::RecordList > | ntesuki_hash_map |
Private 変数 | |
| boost::scoped_ptr< Table > | table |
| bool | verbose |
A table to hold ntesukiRecord.
ntesukiTable.h の 52 行で定義されています。
typedef hash_map<SignatureKey, NtesukiRecord::RecordList> osl::ntesuki::NtesukiTable::ntesuki_hash_map [private] |
ntesukiTable.h の 55 行で定義されています。
| typedef hash_set<PathEncoding, HashPathEncoding> osl::ntesuki::NtesukiTable::PathSet |
ntesukiTable.h の 129 行で定義されています。
ntesukiTable.h の 120 行で定義されています。
| osl::ntesuki::NtesukiTable::NtesukiTable | ( | unsigned int | capacity, | |
| unsigned int | default_gc_size = 0, |
|||
| bool | verbose = false | |||
| ) |
| capacity | 表に保持する最大局面 |
ntesukiTable.cc の 578 行で定義されています。
| osl::ntesuki::NtesukiTable::~NtesukiTable | ( | ) |
ntesukiTable.cc の 587 行で定義されています。
参照先 begin(), depth, depths, osl::ntesuki::NtesukiRecord::distance, end(), size(), table, と verbose.
| NtesukiRecord* osl::ntesuki::NtesukiTable::allocateRoot | ( | const HashKey & | key, | |
| const PieceStand & | white_stand, | |||
| signed short | distance, | |||
| const NumEffectState * | root_state = NULL | |||
| ) | [inline] |
テーブルをひく.
もし要素が見つからなかった場合, テーブルの大きさを増やして良いのなら, 新しい要素を allocate する.
ntesukiTable.h の 160 行で定義されています。
参照先 table.
| NtesukiRecord* osl::ntesuki::NtesukiTable::allocateWithMove | ( | NtesukiRecord * | record, | |
| const NtesukiMove & | move | |||
| ) | [inline] |
ntesukiTable.h の 173 行で定義されています。
参照先 osl::PieceStand::add(), osl::Move::capturePtype(), osl::ntesuki::NtesukiRecord::checkNewParent(), osl::ntesuki::NtesukiRecord::distance, osl::ntesuki::NtesukiMove::getMove(), osl::Move::isDrop(), osl::ntesuki::NtesukiMove::isPass(), osl::ntesuki::NtesukiRecord::key, osl::eval::min(), osl::Move::player(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::PieceStand::sub(), table, osl::unpromote(), と osl::ntesuki::NtesukiRecord::white_stand.
参照元 osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::NtesukiSearcher::attackWithOrder(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::defenseForProof(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::handleInterpose(), osl::ntesuki::NtesukiSearcher::handleNonAttack(), osl::ntesuki::NtesukiSearcher::simulateSiblingsFail(), と osl::ntesuki::NtesukiSearcher::simulateSiblingsSuccess().
| Table::const_iterator osl::ntesuki::NtesukiTable::begin | ( | ) | const [inline] |
| unsigned int osl::ntesuki::NtesukiTable::capacity | ( | ) | const [inline] |
ntesukiTable.h の 305 行で定義されています。
参照先 table.
| void osl::ntesuki::NtesukiTable::clear | ( | ) | [inline] |
ntesukiTable.h の 141 行で定義されています。
参照先 table.
| void osl::ntesuki::NtesukiTable::collectGarbage | ( | unsigned int | gc_size | ) | [inline] |
| Table::const_iterator osl::ntesuki::NtesukiTable::end | ( | ) | const [inline] |
| void osl::ntesuki::NtesukiTable::erase | ( | const HashKey | key | ) | [inline] |
| const NtesukiRecord* osl::ntesuki::NtesukiTable::find | ( | const HashKey & | key | ) | const [inline] |
ntesukiTable.h の 209 行で定義されています。
参照先 table.
| NtesukiRecord* osl::ntesuki::NtesukiTable::find | ( | const HashKey & | key | ) | [inline] |
| NtesukiRecord* osl::ntesuki::NtesukiTable::findWithMove | ( | NtesukiRecord * | record, | |
| const NtesukiMove & | move | |||
| ) | [inline] |
与えられた
| move | に格納されている手を返そうとする. なかったらテーブルから引く. |
ntesukiTable.h の 234 行で定義されています。
参照先 osl::ntesuki::NtesukiRecord::checkNewParent(), osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getPieceStandSlow(), osl::ntesuki::NtesukiMove::isDrop(), osl::ntesuki::NtesukiMove::isNormal(), osl::ntesuki::NtesukiRecord::key, osl::Move::player(), osl::Move::ptype(), table, と osl::unpromote().
参照元 osl::ntesuki::NtesukiRecord::calcProofPiecesAnd(), osl::ntesuki::NtesukiRecord::calcProofPiecesOr(), osl::ntesuki::NtesukiSearcher::defenseWithPlayer(), osl::ntesuki::NtesukiSearcher::handleInterpose(), osl::ntesuki::NtesukiSearcher::handleNonAttack(), osl::ntesuki::NtesukiSearcher::selectMoveAttack(), osl::ntesuki::NtesukiSearcher::selectMoveDefense(), osl::ntesuki::NtesukiRecord::setDisproofPieces(), と osl::ntesuki::NtesukiRecord::setProofPieces().
| NtesukiRecord* osl::ntesuki::NtesukiTable::findWithMoveConst | ( | const NtesukiRecord * | record, | |
| const NtesukiMove & | move | |||
| ) | [inline] |
ntesukiTable.h の 260 行で定義されています。
参照先 osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getPieceStandSlow(), osl::ntesuki::NtesukiMove::isDrop(), osl::ntesuki::NtesukiMove::isNormal(), osl::ntesuki::NtesukiRecord::key, osl::Move::player(), osl::Move::ptype(), table, と osl::unpromote().
参照元 osl::ntesuki::OracleProverLight::attack(), osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::ntesuki::OracleProverLight::defense(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), と osl::ntesuki::NtesukiSimulationSearcher::defenseForProof().
| void osl::ntesuki::NtesukiTable::forEachRecord | ( | F & | f | ) | [inline] |
| void osl::ntesuki::NtesukiTable::forEachRecordFromRoot | ( | F & | f | ) | [inline] |
| bool osl::ntesuki::NtesukiTable::isVerbose | ( | ) | const |
ntesukiTable.cc の 626 行で定義されています。
参照先 verbose.
| void osl::ntesuki::NtesukiTable::lockGC | ( | ) | [inline] |
| unsigned int osl::ntesuki::NtesukiTable::size | ( | ) | const [inline] |
テーブルに登録された record の数.
ntesukiTable.h の 300 行で定義されています。
参照先 table.
参照元 CountChildLock::CountChildLock(), CountChildLock::~CountChildLock(), osl::ntesuki::NtesukiSearcher::~NtesukiSearcher(), と ~NtesukiTable().
| void osl::ntesuki::NtesukiTable::unlockGC | ( | ) | [inline] |
| std::vector<int> osl::ntesuki::NtesukiTable::depths |
ntesukiTable.h の 131 行で定義されています。
参照元 ~NtesukiTable().
boost::scoped_ptr<Table> osl::ntesuki::NtesukiTable::table [private] |
ntesukiTable.h の 116 行で定義されています。
参照元 allocateRoot(), allocateWithMove(), begin(), capacity(), clear(), collectGarbage(), end(), erase(), find(), findWithMove(), findWithMoveConst(), forEachRecord(), forEachRecordFromRoot(), lockGC(), RecordPrinter2::operator()(), RecordPrinter::operator()(), size(), unlockGC(), と ~NtesukiTable().
bool osl::ntesuki::NtesukiTable::verbose [private] |
ntesukiTable.h の 117 行で定義されています。
参照元 isVerbose(), と ~NtesukiTable().
1.6.3