Struct TranspositionTable

Source
pub struct TranspositionTable { /* private fields */ }

Implementations§

Source§

impl TranspositionTable

Source

pub fn print_info(&self)

Source

pub fn new(cache_table_size: CacheTableSize) -> Self

Source

pub fn read( &self, key: u64, depth: Depth, ply: Ply, ) -> (Option<(Score, EntryFlagHash)>, Option<Move>)

Source

pub fn read_best_move(&self, key: u64) -> Option<Move>

Source

pub fn write( &self, key: u64, depth: Depth, ply: Ply, score: Score, flag: EntryFlagHash, best_move: Option<Move>, )

Source

pub fn clear_best_moves(&self)

Methods from Deref<Target = CacheTable<TranspositionTableEntry>>§

Source

pub fn get(&self, hash: u64) -> Option<T>

Source

pub fn add(&self, hash: u64, entry: T)

Source

pub fn replace_if<F: Fn(T) -> bool>(&self, hash: u64, entry: T, replace: F)

Source

pub fn clear(&self)

Source

pub fn get_table(&self) -> &RwLock<Box<[Option<CacheTableEntry<T>>]>>

Source

pub fn get_num_cells_filled(&self) -> usize

Source

pub fn get_num_overwrites(&self) -> usize

Source

pub fn get_num_collisions(&self) -> usize

Source

pub fn get_zero_hit(&self) -> usize

Source

pub fn reset_num_cells_filled(&self)

Source

pub fn reset_num_overwrites(&self)

Source

pub fn reset_num_collisions(&self)

Source

pub fn reset_zero_hit(&self)

Source

pub fn reset_variables(&self)

Variable needed to be reset per search

Source

pub fn get_hash_full(&self) -> f64

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn get_size(&self) -> CacheTableSize

Source

pub fn set_size(&self, size: CacheTableSize)

Trait Implementations§

Source§

impl Clone for TranspositionTable

Source§

fn clone(&self) -> TranspositionTable

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TranspositionTable

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TranspositionTable

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Deref for TranspositionTable

Source§

type Target = CacheTable<TranspositionTableEntry>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'de> Deserialize<'de> for TranspositionTable

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TranspositionTable

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromQuery for T

Source§

type Target = T

Target type after parsing.
Source§

type Error = HistoryError

Error that can occur while parsing.
Source§

fn from_query( query: &str, ) -> Result<<T as FromQuery>::Target, <T as FromQuery>::Error>

Decode this query string into the target type.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToQuery for T
where T: Serialize,

Source§

type Error = HistoryError

Error that can be returned from the conversion.
Source§

fn to_query(&self) -> Result<Cow<'_, str>, <T as ToQuery>::Error>

Method to encode the query into a string.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Ungil for T
where T: Send,