Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Classes | Namespaces | Typedefs | Functions

SgHash.h File Reference

Hash codes and Zobrist tables. More...

#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.

Classes

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

Namespaces

namespace  SgHashUtil

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).

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.


Typedef Documentation

typedef SgHash<64> SgHashCode

For backwards compatibility.

Definition at line 96 of file SgHash.h.

For backwards compatibility.

Definition at line 311 of file SgHash.h.


Function Documentation

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

Definition at line 267 of file SgHash.h.

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

Definition at line 274 of file SgHash.h.

References SgHash< N >::FromString().


Sun Mar 13 2011 Doxygen 1.7.1