Trait shakmaty::zobrist::ZobristHash [−][src]
pub trait ZobristHash {
fn zobrist_hash<V: ZobristValue>(&self) -> V;
fn prepare_incremental_zobrist_hash<V: ZobristValue>(
&self,
_previous: V,
_m: &Move
) -> Option<V> { ... }
fn finalize_incremental_zobrist_hash<V: ZobristValue>(
&self,
_intermediate: V,
_m: &Move
) -> Option<V> { ... }
}
Expand description
Supports Zobrist hashing.
Required methods
fn zobrist_hash<V: ZobristValue>(&self) -> V
fn zobrist_hash<V: ZobristValue>(&self) -> V
Computes the Zobrist hash from scratch.
Provided methods
fn prepare_incremental_zobrist_hash<V: ZobristValue>(
&self,
_previous: V,
_m: &Move
) -> Option<V>
fn prepare_incremental_zobrist_hash<V: ZobristValue>(
&self,
_previous: V,
_m: &Move
) -> Option<V>
Prepares an incremental update of the Zobrist hash before playing move
m
in self
. Returns a new intermediate Zobrist hash, or None
if incremental updating is not supported.
fn finalize_incremental_zobrist_hash<V: ZobristValue>(
&self,
_intermediate: V,
_m: &Move
) -> Option<V>
fn finalize_incremental_zobrist_hash<V: ZobristValue>(
&self,
_intermediate: V,
_m: &Move
) -> Option<V>
Finalizes an incremental update of the Zobrist hash after playing move
m
in self
. Returns the new Zobrist hash, or None
if incremental
updating is not supported.