Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgHash.h File Reference


Detailed Description

Hash codes and Zobrist tables.

See A.L. Zobrist "A New Hashing Method with Application for Game Playing", Techn. Rep. #88, Univ. of Wisconsin, Madison, WI 53706, April 1970. (Reprinted in ICCA Journal, Spring 1990?.)

Definition in file SgHash.h.

#include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <sstream>
#include "SgArray.h"
#include "SgException.h"
#include "SgRandom.h"

Go to the source code of this file.

Namespaces

namespace  SgHashUtil

Classes

class  SgHash< N >
 N-bit hash codes. More...
class  SgHashZobrist< N >
 Provides random hash codes for Zobrist hashing. More...

Typedefs

typedef SgHash< 64 > SgHashCode
 For backwards compatibility.
typedef SgHashZobrist< 64 > SgHashZobristTable
 For backwards compatibility.

Functions

template<int N>
std::ostream & operator<< (std::ostream &out, const SgHash< N > &hash)
template<int N>
std::ostream & operator>> (std::istream &in, const SgHash< N > &hash)
template<int N>
SgHash< N > SgHashUtil::GetZobrist (int index)
 Xor hash code with code from the global Zobrist table.
template<int N>
void SgHashUtil::XorZobrist (SgHash< N > &hash, int index)
 Xor hash code with code from the global Zobrist table.
template<int N>
void SgHashUtil::XorInteger (SgHash< N > &hash, int index)
 Xor hash code with integer index (no max value).


Typedef Documentation

typedef SgHash<64> SgHashCode

For backwards compatibility.

Definition at line 101 of file SgHash.h.

typedef SgHashZobrist<64> SgHashZobristTable

For backwards compatibility.

Definition at line 317 of file SgHash.h.


Function Documentation

template<int N>
std::ostream& operator<< ( std::ostream &  out,
const SgHash< N > &  hash 
)

Definition at line 272 of file SgHash.h.

template<int N>
std::ostream& operator>> ( std::istream &  in,
const SgHash< N > &  hash 
)

Definition at line 279 of file SgHash.h.

References SgHash< N >::FromString().


17 Jun 2010 Doxygen 1.4.7