Container of moves to check duplicated games. [詳細]
#include <checkDuplicate.h>
Public 型 | |
enum | DUPLICATE_RESULT { NO_DUPLICATE = 0, HASH_DUPLICATE = 1, MOVES_DUPLICATE = 2 } |
Result type of checking duplicates. [詳細] | |
Public メソッド | |
CheckDuplicate () | |
Constructor. | |
DUPLICATE_RESULT | regist (const std::vector< Move > &moves) |
Insert a key if the key is new. | |
void | print (std::ostream &out) const |
Output the result. | |
size_t | getRegists () const |
Return a couter of registings (trials). | |
size_t | getDuplicatedHash () const |
Return a counter of duplicated ending states. | |
size_t | getDuplicatedMoves () const |
Return a counter of duplicated moves. | |
Static Public メソッド | |
static std::pair< HashKey, PathEncoding > | getLastState (const std::vector< Move > &moves) |
Private 型 | |
typedef std::unordered_map < HashKey, std::vector < PathEncoding >, std::hash < HashKey > > | keymap_t |
Private メソッド | |
DUPLICATE_RESULT | regist (const HashKey &key, const PathEncoding &moves) |
Insert a key if the key is new. | |
Private 変数 | |
keymap_t | keys |
container of moves | |
size_t | regist_counter |
couter for registing (trials) | |
size_t | duplicated_hash_counter |
counter for hash matches with different moves | |
size_t | duplicated_moves_counter |
counter for exact matches of moves |
Container of moves to check duplicated games.
checkDuplicate.h の 19 行で定義されています。
typedef std::unordered_map<HashKey, std::vector<PathEncoding>, std::hash<HashKey> > osl::record::CheckDuplicate::keymap_t [private] |
checkDuplicate.h の 21 行で定義されています。
Result type of checking duplicates.
checkDuplicate.h の 37 行で定義されています。
osl::record::CheckDuplicate::CheckDuplicate | ( | ) | [inline] |
Constructor.
checkDuplicate.h の 47 行で定義されています。
size_t osl::record::CheckDuplicate::getDuplicatedHash | ( | ) | const [inline] |
Return a counter of duplicated ending states.
The moves may or may not match.
checkDuplicate.h の 79 行で定義されています。
size_t osl::record::CheckDuplicate::getDuplicatedMoves | ( | ) | const [inline] |
std::pair< osl::HashKey, osl::PathEncoding > osl::record::CheckDuplicate::getLastState | ( | const std::vector< Move > & | moves | ) | [static] |
checkDuplicate.cc の 7 行で定義されています。
参照先 osl::BLACK, osl::NumEffectState::isConsistent(), osl::NumEffectState::makeMove(), と osl::PathEncoding::pushMove().
参照元 regist().
size_t osl::record::CheckDuplicate::getRegists | ( | ) | const [inline] |
void osl::record::CheckDuplicate::print | ( | std::ostream & | out | ) | const |
Output the result.
checkDuplicate.cc の 60 行で定義されています。
参照先 duplicated_hash_counter, duplicated_moves_counter, keys, と regist_counter.
osl::record::CheckDuplicate::DUPLICATE_RESULT osl::record::CheckDuplicate::regist | ( | const std::vector< Move > & | moves | ) |
Insert a key if the key is new.
The key is the last state of the moves.
moves |
checkDuplicate.cc の 21 行で定義されています。
参照先 getLastState().
osl::record::CheckDuplicate::DUPLICATE_RESULT osl::record::CheckDuplicate::regist | ( | const HashKey & | key, | |
const PathEncoding & | moves | |||
) | [private] |
Insert a key if the key is new.
key | a hash key of the last state of the moves | |
moves |
checkDuplicate.cc の 28 行で定義されています。
参照先 duplicated_hash_counter, duplicated_moves_counter, keys, と regist_counter.
size_t osl::record::CheckDuplicate::duplicated_hash_counter [private] |
counter for hash matches with different moves
checkDuplicate.h の 27 行で定義されています。
参照元 getDuplicatedHash(), print(), と regist().
size_t osl::record::CheckDuplicate::duplicated_moves_counter [private] |
counter for exact matches of moves
checkDuplicate.h の 29 行で定義されています。
参照元 getDuplicatedMoves(), print(), と regist().
keymap_t osl::record::CheckDuplicate::keys [private] |
size_t osl::record::CheckDuplicate::regist_counter [private] |
couter for registing (trials)
checkDuplicate.h の 25 行で定義されています。
参照元 getRegists(), print(), と regist().