Public 型 | Public メソッド | Static Public メソッド | Private 型 | Private メソッド | Private 変数

クラス osl::record::CheckDuplicate

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.h19 行で定義されています。


型定義

typedef std::unordered_map<HashKey, std::vector<PathEncoding>, std::hash<HashKey> > osl::record::CheckDuplicate::keymap_t [private]

checkDuplicate.h21 行で定義されています。


列挙型

Result type of checking duplicates.

列挙型の値:
NO_DUPLICATE 
HASH_DUPLICATE 
MOVES_DUPLICATE 

checkDuplicate.h37 行で定義されています。


コンストラクタとデストラクタ

osl::record::CheckDuplicate::CheckDuplicate (  )  [inline]

Constructor.

checkDuplicate.h47 行で定義されています。


関数

size_t osl::record::CheckDuplicate::getDuplicatedHash (  )  const [inline]

Return a counter of duplicated ending states.

The moves may or may not match.

checkDuplicate.h79 行で定義されています。

参照先 duplicated_hash_counter.

size_t osl::record::CheckDuplicate::getDuplicatedMoves (  )  const [inline]

Return a counter of duplicated moves.

The moves are exactly same.

checkDuplicate.h85 行で定義されています。

参照先 duplicated_moves_counter.

std::pair< osl::HashKey, osl::PathEncoding > osl::record::CheckDuplicate::getLastState ( const std::vector< Move > &  moves  )  [static]
size_t osl::record::CheckDuplicate::getRegists (  )  const [inline]

Return a couter of registings (trials).

checkDuplicate.h72 行で定義されています。

参照先 regist_counter.

void osl::record::CheckDuplicate::print ( std::ostream &  out  )  const

Output the result.

checkDuplicate.cc60 行で定義されています。

参照先 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 
戻り値:
false if (i) the key is new or (ii) duplicated with different moves; true if the moves are exactly found in this container.

checkDuplicate.cc21 行で定義されています。

参照先 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 
戻り値:
false if (i) the key is new or (ii) duplicated with different moves; true if the moves are exactly found in this container.

checkDuplicate.cc28 行で定義されています。

参照先 duplicated_hash_counter, duplicated_moves_counter, keys, と regist_counter.


変数

counter for hash matches with different moves

checkDuplicate.h27 行で定義されています。

参照元 getDuplicatedHash(), print(), と regist().

counter for exact matches of moves

checkDuplicate.h29 行で定義されています。

参照元 getDuplicatedMoves(), print(), と regist().

container of moves

checkDuplicate.h23 行で定義されています。

参照元 print(), と regist().

couter for registing (trials)

checkDuplicate.h25 行で定義されています。

参照元 getRegists(), print(), と regist().


このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義