手番を含んだ盤面の状態のハッシュ値を保持するためのクラス. More...
#include <boardKey128.h>
Public Member Functions | |
HashKey128 () | |
HashKey128 (uint64_t h0, uint32_t h1, uint32_t s) | |
HashKey128 (const HashKey128Layout &src) | |
const BoardKey96 | boardKey () const |
uint64_t | boardKey64 () const |
uint64_t | signature () const |
uint64_t | hash64 () const |
持駒も含んだ64bitのハッシュ | |
const PieceStand | pieceStand () const |
const PieceStand | blackStand () const |
void | setPieceStand (const PieceStand &p) |
bool | isSameBoard (const HashKey128 &key) const |
駒台の情報を除いて同じかどうか. | |
HashKey128 & | operator+= (const HashKey128 &r) |
HashKey128 & | operator-= (const HashKey128 &r) |
void | add (Move move) |
void | changeTurn () |
void | setPlayer (Player p) |
bool | playerBit () const |
bool | isPlayerOfTurn (Player p) const |
Player | turn () const |
void | setRandom () |
乱数で初期化. | |
size_t | size () const |
uint64_t | operator[] (size_t i) const |
Friends | |
class | HashGenTable |
手番を含んだ盤面の状態のハッシュ値を保持するためのクラス.
Board 96bit + 駒台(piece stand) 32bit
Definition at line 36 of file boardKey128.h.
osl::hash::HashKey128::HashKey128 | ( | ) | [inline] |
Definition at line 40 of file boardKey128.h.
References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, and osl::hash::HashKey128Layout::piece_stand.
osl::hash::HashKey128::HashKey128 | ( | uint64_t | h0, |
uint32_t | h1, | ||
uint32_t | s | ||
) | [inline] |
Definition at line 44 of file boardKey128.h.
References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, and osl::hash::HashKey128Layout::piece_stand.
osl::hash::HashKey128::HashKey128 | ( | const HashKey128Layout & | src | ) | [inline] |
Definition at line 50 of file boardKey128.h.
void osl::hash::HashKey128::add | ( | Move | move | ) | [inline] |
Definition at line 90 of file boardKey128.h.
References osl::hash::HashKey128Layout::board64, and osl::Move::intValue().
const PieceStand osl::hash::HashKey128::blackStand | ( | ) | const [inline] |
Definition at line 61 of file boardKey128.h.
References osl::hash::HashKey128Layout::piece_stand.
const BoardKey96 osl::hash::HashKey128::boardKey | ( | ) | const [inline] |
Definition at line 53 of file boardKey128.h.
References osl::hash::HashKey128Layout::board32, and osl::hash::HashKey128Layout::board64.
Referenced by isSameBoard(), osl::hash::operator<(), osl::hash::operator<<(), and osl::hash::operator==().
uint64_t osl::hash::HashKey128::boardKey64 | ( | ) | const [inline] |
Definition at line 56 of file boardKey128.h.
References osl::hash::HashKey128Layout::board64.
void osl::hash::HashKey128::changeTurn | ( | ) | [inline] |
Definition at line 91 of file boardKey128.h.
References osl::hash::HashKey128Layout::board64.
Referenced by osl::hash::HashKey::newMakeMove(), and osl::hash::HashKey::newUnmakeMove().
uint64_t osl::hash::HashKey128::hash64 | ( | ) | const [inline] |
持駒も含んだ64bitのハッシュ
Definition at line 59 of file boardKey128.h.
References osl::hash::HashKey128Layout::board64, and osl::hash::HashKey128Layout::piece_stand.
bool osl::hash::HashKey128::isPlayerOfTurn | ( | Player | p | ) | const [inline] |
Definition at line 98 of file boardKey128.h.
References playerBit(), and osl::playerToIndex().
Referenced by turn().
bool osl::hash::HashKey128::isSameBoard | ( | const HashKey128 & | key | ) | const [inline] |
駒台の情報を除いて同じかどうか.
手番が異なるものは異なると定義する
Definition at line 68 of file boardKey128.h.
References boardKey().
HashKey128& osl::hash::HashKey128::operator+= | ( | const HashKey128 & | r | ) | [inline] |
Definition at line 72 of file boardKey128.h.
References osl::PieceStand::addAtmostOnePiece(), osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, osl::PieceStand::getFlags(), osl::hash::HashKey128Layout::piece_stand, and pieceStand().
HashKey128& osl::hash::HashKey128::operator-= | ( | const HashKey128 & | r | ) | [inline] |
Definition at line 81 of file boardKey128.h.
References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, osl::PieceStand::getFlags(), osl::hash::HashKey128Layout::piece_stand, pieceStand(), and osl::PieceStand::subAtmostOnePiece().
uint64_t osl::hash::HashKey128::operator[] | ( | size_t | i | ) | const [inline] |
Definition at line 109 of file boardKey128.h.
References osl::hash::HashKey128Layout::board32, and osl::hash::HashKey128Layout::board64.
Referenced by osl::hash::HashKey::dumpContents().
const PieceStand osl::hash::HashKey128::pieceStand | ( | ) | const [inline] |
Definition at line 60 of file boardKey128.h.
References osl::hash::HashKey128Layout::piece_stand.
Referenced by osl::hash::HashKey::dumpContents(), operator+=(), operator-=(), osl::hash::operator<(), osl::hash::operator<<(), and osl::hash::operator==().
bool osl::hash::HashKey128::playerBit | ( | ) | const [inline] |
Definition at line 97 of file boardKey128.h.
References osl::hash::HashKey128Layout::board64.
Referenced by isPlayerOfTurn().
void osl::hash::HashKey128::setPieceStand | ( | const PieceStand & | p | ) | [inline] |
Definition at line 62 of file boardKey128.h.
References osl::PieceStand::getFlags(), and osl::hash::HashKey128Layout::piece_stand.
void osl::hash::HashKey128::setPlayer | ( | Player | p | ) | [inline] |
Definition at line 92 of file boardKey128.h.
References osl::hash::HashKey128Layout::board64, and osl::playerToIndex().
void osl::hash::HashKey128::setRandom | ( | ) |
乱数で初期化.
pieceStandには触らない
Definition at line 6 of file boardKey128.cc.
References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, osl::misc::Random< unsigned int >::newValue(), and osl::misc::Random< unsigned long long >::newValue().
uint64_t osl::hash::HashKey128::signature | ( | ) | const [inline] |
Definition at line 57 of file boardKey128.h.
References osl::hash::HashKey128Layout::board32.
Referenced by hash::operator()(), osl::hash::HashRandomPair::value(), and osl::hash::HashRandom::value().
size_t osl::hash::HashKey128::size | ( | ) | const [inline] |
Definition at line 108 of file boardKey128.h.
Referenced by osl::hash::HashKey::dumpContents(), and osl::search::SimpleHashTable::getPV().
Player osl::hash::HashKey128::turn | ( | ) | const [inline] |
Definition at line 102 of file boardKey128.h.
References osl::BLACK, isPlayerOfTurn(), and osl::WHITE.
friend class HashGenTable [friend] |
Definition at line 38 of file boardKey128.h.