Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes

SgHashZobrist< N > Class Template Reference

Provides random hash codes for Zobrist hashing. More...

#include <SgHash.h>

List of all members.

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_INDEX
m_hash

Static Private Attributes

static SgHashZobrist m_globalTable

Detailed Description

template<int N>
class SgHashZobrist< N >

Provides random hash codes for Zobrist hashing.

Definition at line 286 of file SgHash.h.


Constructor & Destructor Documentation

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

Definition at line 317 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 299 of file SgHash.h.

References SgHashZobrist< N >::m_hash.

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

Global table for this size of hash code.

Definition at line 324 of file SgHash.h.

References SgHashZobrist< N >::m_globalTable.


Member Data Documentation

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

Definition at line 305 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 307 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 295 of file SgHash.h.

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


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


Sun Mar 13 2011 Doxygen 1.7.1