Struct pleco::tools::tt::TranspositionTable[][src]

pub struct TranspositionTable { /* fields omitted */ }

Structure for representing a TranspositionTable. A Transposition Table is a type of HashTable that maps Zobrist Keys to information about that position, including the best move found, score, depth the move was found at, and other information.

Methods

impl TranspositionTable
[src]

MAX_SIZE_MB: usize = 100000

Creates new with a size of around 'mb_size'. Actual size is the nearest power of 2 times the size of a Cluster rounded down.

Panics

mb_size should be > 0, or else a panic will occur

Creates new TT rounded up to the nearest power of two number of entries.

Panics

num_entries should be > 0, or else a panic will occur

Creates new TT rounded up to the nearest power of two number of Clusters.

Panics

Size should be > 0, or else a panic will occur

Returns the size of the heap allocated portion of the TT in KiloBytes.

Returns the size of the heap allocated portion of the TT in MegaBytes.

Returns the size of the heap allocated portion of the TT in GigaBytes.

Returns the number of clusters the Transposition Table holds.

Returns the number of Entries the Transposition Table holds.

Re-sizes to 'size' number of Clusters and deletes all data

Panic

size must be greater then 0

Safety

This is function is unsafe to use if the TT is currently being accessed, Or any thread of structure contains a current reference to a TTEntry. Otherwise, using this function will absolutely lead to Segmentation Fault.

Re-sizes to the the mb_size number of megabytes, rounded down for power of 2 number of clusters. Returns the actual size.

Panic

mb_size must be greater then 0

Safety

This is function is unsafe to use if the TT is currently being accessed, Or any thread of structure contains a current reference to a TTEntry. Otherwise, using this function will absolutely lead to Segmentation Fault.

Clears the entire TranspositionTable

Safety

This is function is unsafe to use if the TT is currently being accessed, Or any thread of structure contains a current reference to a TTEntry. Otherwise, using this function will absolutely lead to Segmentation Fault.

Returns the current time age of a TT.

Returns the current number of cycles a TT has gone through. Cycles is simply the number of times refresh has been called.

Probes the Transposition Table for a specified Key. Returns (true, entry) if either (1) an Entry corresponding to the current key is found, or an Open Entry slot is found for the key. In the case of an open Entry, the entry can be tested for its contents by using Entry::is_empty(). If no entry is found && there are no open entries, returns the entry that is is most irrelevent to the current search, e.g. has the shallowest depth or was found in a previous search.

If 'true' is returned, the Entry is guaranteed to have the correct time.

Returns the % of the hash table that is full.

Trait Implementations

impl Sync for TranspositionTable
[src]

impl PreFetchable for TranspositionTable
[src]

Pre-fetches a particular key. This means bringing it into the cache for faster eventual access.

Pre-fetches a particular key, alongside the next key.

impl Drop for TranspositionTable
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations