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). |
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 SgHash<64> SgHashCode |
typedef SgHashZobrist<64> SgHashZobristTable |
std::ostream& operator<< | ( | std::ostream & | out, | |
const SgHash< N > & | hash | |||
) |
std::ostream& operator>> | ( | std::istream & | in, | |
const SgHash< N > & | hash | |||
) |
Definition at line 274 of file SgHash.h.
References SgHash< N >::FromString().