osl::hash::HashKey128 Class Reference

手番を含んだ盤面の状態のハッシュ値を保持するためのクラス. More...

`#include <hashKey.h>`

Inheritance diagram for osl::hash::HashKey128:

## Classes

struct | StandHash

## 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のハッシュ
uint64_t | pieceStand64 () const
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

## Static Public Attributes

static const StandHash | Stand_Hash

## Friends

class | HashGenTable

## Additional Inherited Members

Private Attributes inherited from osl::hash::HashKey128Layout
uint64_t | board64
uint32_t | board32
uint32_t | piece_stand

## Detailed Description

手番を含んだ盤面の状態のハッシュ値を保持するためのクラス.

Board 96bit + 駒台(piece stand) 32bit

Definition at line 36 of file hashKey.h.

## Constructor & Destructor Documentation

## HashKey128() [1/3]

osl::hash::HashKey128::HashKey128 | ( |  | ) |

inline

Definition at line 40 of file hashKey.h.

References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, and osl::hash::HashKey128Layout::piece_stand.

Referenced by isSameBoard(), operator+=(), and operator-=().

## HashKey128() [2/3]

osl::hash::HashKey128::HashKey128 | ( | uint64_t | h0,
|  | uint32_t | h1,
|  | uint32_t | s )

inline

Definition at line 44 of file hashKey.h.

References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, and osl::hash::HashKey128Layout::piece_stand.

## HashKey128() [3/3]

osl::hash::HashKey128::HashKey128 | ( | const HashKey128Layout & | src | ) |

inline

Definition at line 50 of file hashKey.h.

## Member Function Documentation

## add()

void osl::hash::HashKey128::add | ( | Move | move | ) |

inline

Definition at line 93 of file hashKey.h.

References osl::hash::HashKey128Layout::board64, and osl::Move::intValue().

## blackStand()

const PieceStand osl::hash::HashKey128::blackStand | ( |  | ) | const

inline

Definition at line 64 of file hashKey.h.

References osl::hash::HashKey128Layout::piece_stand.

Referenced by osl::checkmate::DfpnTable::addDag(), osl::checkmate::DfpnPathTable::allocate(), osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), osl::checkmate::DfpnTable::List::estimateNodeCount(), osl::checkmate::ProofTreeDepthDfpn::Table::expectMoreDepth(), osl::checkmate::DualDfpn::findProof(), osl::checkmate::DfpnTable::findProofOracle(), osl::checkmate::DfpnTable::List::findProofOracle(), osl::checkmate::DfpnTable::leaveWorking(), osl::checkmate::DfpnPathTable::probe(), osl::checkmate::DfpnTable::List::probe(), osl::checkmate::DfpnTable::probe(), osl::checkmate::Dfpn::setIllegal(), osl::checkmate::DfpnTable::setWorking(), osl::checkmate::DfpnTable::List::showProofOracles(), and osl::checkmate::DfpnTable::store().

## boardKey()

const BoardKey96 osl::hash::HashKey128::boardKey | ( |  | ) | const

inline

Definition at line 53 of file hashKey.h.

References osl::hash::HashKey128Layout::board32, and osl::hash::HashKey128Layout::board64.

Referenced by osl::checkmate::DfpnTable::addDag(), osl::checkmate::DfpnPathTable::allocate(), osl::checkmate::ProofTreeDepthDfpn::Table::expectMoreDepth(), osl::checkmate::DfpnTable::find(), osl::checkmate::DfpnTable::find(), isSameBoard(), osl::checkmate::DfpnTable::leaveWorking(), osl::hash::operator<(), osl::hash::operator<<(), osl::hash::operator==(), osl::checkmate::DfpnPathTable::probe(), osl::checkmate::DfpnTable::setWorking(), osl::checkmate::DfpnTable::store(), and osl::checkmate::ProofTreeDepthDfpn::Table::store().

## boardKey64()

uint64_t osl::hash::HashKey128::boardKey64 | ( |  | ) | const

inline

Definition at line 56 of file hashKey.h.

References osl::hash::HashKey128Layout::board64.

## changeTurn()

void osl::hash::HashKey128::changeTurn | ( |  | ) |

inline

Definition at line 94 of file hashKey.h.

References osl::hash::HashKey128Layout::board64.

Referenced by osl::hash::HashKey::newMakeMove(), and osl::hash::HashKey::newUnmakeMove().

## hash64()

uint64_t osl::hash::HashKey128::hash64 | ( |  | ) | const

inline

持駒も含んだ64bitのハッシュ

Definition at line 59 of file hashKey.h.

References osl::hash::HashKey128Layout::board64, and pieceStand64().

## isPlayerOfTurn()

bool osl::hash::HashKey128::isPlayerOfTurn | ( | Player | p | ) | const

inline

Definition at line 101 of file hashKey.h.

References playerBit(), and osl::playerToIndex().

Referenced by turn().

## isSameBoard()

bool osl::hash::HashKey128::isSameBoard | ( | const HashKey128 & | key | ) | const

inline

駒台の情報を除いて同じかどうか.

手番が異なるものは異なると定義する

Definition at line 71 of file hashKey.h.

References boardKey(), and HashKey128().

## operator+=()

HashKey128 & osl::hash::HashKey128::operator+= | ( | const HashKey128 & | r | ) |

inline

Definition at line 75 of file hashKey.h.

References osl::PieceStand::addAtmostOnePiece(), osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, osl::PieceStand::getFlags(), HashKey128(), osl::hash::HashKey128Layout::piece_stand, and pieceStand().

## operator-=()

HashKey128 & osl::hash::HashKey128::operator-= | ( | const HashKey128 & | r | ) |

inline

Definition at line 84 of file hashKey.h.

References osl::hash::HashKey128Layout::board32, osl::hash::HashKey128Layout::board64, osl::PieceStand::getFlags(), HashKey128(), osl::hash::HashKey128Layout::piece_stand, pieceStand(), and osl::PieceStand::subAtmostOnePiece().

## operator[]()

uint64_t osl::hash::HashKey128::operator[] | ( | size_t | i | ) | const

inline

Definition at line 112 of file hashKey.h.

References osl::hash::HashKey128Layout::board32, and osl::hash::HashKey128Layout::board64.

Referenced by osl::hash::HashKey::dumpContents().

## pieceStand()

const PieceStand osl::hash::HashKey128::pieceStand | ( |  | ) | const

inline

Definition at line 63 of file hashKey.h.

References osl::hash::HashKey128Layout::piece_stand.

Referenced by osl::hash::HashKey::dumpContents(), operator+=(), operator-=(), osl::hash::operator<(), osl::hash::operator<<(), osl::hash::operator==(), and pieceStand64().

## pieceStand64()

uint64_t osl::hash::HashKey128::pieceStand64 | ( |  | ) | const

inline

Definition at line 60 of file hashKey.h.

References pieceStand(), and Stand_Hash.

Referenced by hash64().

## playerBit()

bool osl::hash::HashKey128::playerBit | ( |  | ) | const

inline

Definition at line 100 of file hashKey.h.

References osl::hash::HashKey128Layout::board64.

Referenced by isPlayerOfTurn().

## setPieceStand()

void osl::hash::HashKey128::setPieceStand | ( | const PieceStand & | p | ) |

inline

Definition at line 65 of file hashKey.h.

References osl::PieceStand::getFlags(), and osl::hash::HashKey128Layout::piece_stand.

## setPlayer()

void osl::hash::HashKey128::setPlayer | ( | Player | p | ) |

inline

Definition at line 95 of file hashKey.h.

References osl::hash::HashKey128Layout::board64, and osl::playerToIndex().

Referenced by osl::hash::HashKey::HashKey().

## setRandom()

void osl::hash::HashKey128::setRandom | ( |  | ) |

乱数で初期化.

pieceStandには触らない

Definition at line 10 of file hashKey.cc.

References osl::hash::HashKey128Layout::board32, and osl::hash::HashKey128Layout::board64.

## signature()

uint64_t osl::hash::HashKey128::signature | ( |  | ) | const

inline

Definition at line 57 of file hashKey.h.

References osl::hash::HashKey128Layout::board32.

Referenced by osl::checkmate::DfpnTable::keyToIndex(), std::hash< osl::HashKey >::operator()(), and osl::hash::HashRandomPair::value().

## size()

size_t osl::hash::HashKey128::size | ( |  | ) | const

inline

Definition at line 111 of file hashKey.h.

Referenced by osl::hash::HashKey::dumpContents().

## turn()

Player osl::hash::HashKey128::turn | ( |  | ) | const

inline

Definition at line 105 of file hashKey.h.

References osl::BLACK, isPlayerOfTurn(), and osl::WHITE.

Referenced by osl::checkmate::Dfpn::findDagSource(), osl::RepetitionCounter::isConsistent(), osl::RepetitionCounter::pop(), and osl::RepetitionCounter::push().

## Friends And Related Symbol Documentation

## HashGenTable

friend class HashGenTable

friend

Definition at line 38 of file hashKey.h.

References HashGenTable.

Referenced by HashGenTable.

## Member Data Documentation

## Stand_Hash

const StandHash osl::hash::HashKey128::Stand_Hash

static

Definition at line 127 of file hashKey.h.

Referenced by pieceStand64().

The documentation for this class was generated from the following files:

- hashKey.h
- hashKey.cc