3#include <boost/format.hpp>
12 for (
Move move: moves) {
17 return std::make_pair(
HashKey(state), path);
23 const std::pair<HashKey, PathEncoding> pair =
getLastState(moves);
24 return regist(pair.first, pair.second);
33 std::vector<PathEncoding>& rs =
keys[key];
42 if (std::find(rs.begin(), rs.end(), moves)
62 out << boost::format(
"Trials %d, Unique %d, Duplicates Hash %d, Duplicated moves %d\n")
bool isConsistent(bool showError=true) const
DUPLICATE_RESULT
Result type of checking duplicates.
keymap_t keys
container of moves
size_t duplicated_hash_counter
counter for hash matches with different moves
static std::pair< HashKey, PathEncoding > getLastState(const std::vector< Move > &moves)
size_t duplicated_moves_counter
counter for exact matches of moves
DUPLICATE_RESULT regist(const std::vector< Move > &moves)
Insert a key if the key is new.
size_t regist_counter
couter for registing (trials)
void print(std::ostream &out) const
Output the result.