Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgHashZobrist< N > Class Template Reference

#include <SgHash.h>

List of all members.


Detailed Description

template<int N>
class SgHashZobrist< N >

Provides random hash codes for Zobrist hashing.

Definition at line 291 of file SgHash.h.

Public Member Functions

 SgHashZobrist ()
const SgHash< N > & Get (int index) const

Static Public Member Functions

static const SgHashZobristGetTable ()
 Global table for this size of hash code.

Static Public Attributes

static const int MAX_HASH_INDEX = 1500
 Hash index.

Private Attributes

SgArray< SgHash< N >, MAX_HASH_INDEXm_hash

Static Private Attributes

static SgHashZobrist m_globalTable


Constructor & Destructor Documentation

template<int N>
SgHashZobrist< N >::SgHashZobrist (  ) 

Definition at line 323 of file SgHash.h.

References SgHashZobrist< N >::m_hash, and SgHashZobrist< N >::MAX_HASH_INDEX.


Member Function Documentation

template<int N>
const SgHash<N>& SgHashZobrist< N >::Get ( int  index  )  const

Definition at line 305 of file SgHash.h.

References SgHashZobrist< N >::m_hash.

Referenced by SgHashUtil::GetZobrist().

template<int N>
const SgHashZobrist< N > & SgHashZobrist< N >::GetTable (  )  [static]

Global table for this size of hash code.

Definition at line 330 of file SgHash.h.

References SgHashZobrist< N >::m_globalTable.

Referenced by SgHashUtil::GetZobrist().


Member Data Documentation

template<int N>
SgHashZobrist< N > SgHashZobrist< N >::m_globalTable [static, private]

Definition at line 311 of file SgHash.h.

Referenced by SgHashZobrist< N >::GetTable().

template<int N>
SgArray<SgHash<N>,MAX_HASH_INDEX> SgHashZobrist< N >::m_hash [private]

Definition at line 313 of file SgHash.h.

Referenced by SgHashZobrist< N >::Get(), and SgHashZobrist< N >::SgHashZobrist().

template<int N>
const int SgHashZobrist< N >::MAX_HASH_INDEX = 1500 [static]

Hash index.

The hash index ranges from [0..MAX_HASH_INDEX-1]. For board games with black and white pieces, MAX_HASH_INDEX needs to be bigger than twice the number of points on the board. It's up to the client to map points to this range. 2 * SG_MAXPOINT, plus capture hash

Definition at line 301 of file SgHash.h.

Referenced by SgHashZobrist< N >::SgHashZobrist().


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


17 Jun 2010 Doxygen 1.4.7