Skip to main content

GeometricMemoizationConfig

Struct GeometricMemoizationConfig 

Source
#[non_exhaustive]
pub struct GeometricMemoizationConfig { /* private fields */ }
Expand description

Tuning controls for LcpMemoizationPolicy::Geometric.

The defaults were selected on a complete ruSTAR-shaped GRCh38 plus GENCODE workload. Tables are local to a single phase-4 partition cascade and are dropped when that partition is emitted.

use caps_sa::{GeometricMemoizationConfig, LcpMemoizationPolicy};
use std::num::NonZeroUsize;

let config = GeometricMemoizationConfig::default()
    .with_probe_symbols(NonZeroUsize::new(512).unwrap());
let policy = LcpMemoizationPolicy::from(config);

Implementations§

Source§

impl GeometricMemoizationConfig

Source

pub const DEFAULT: Self

The default configuration measured on ruSTAR-shaped GRCh38 plus GENCODE input.

Source

pub const fn probe_symbols(&self) -> usize

Number of symbols compared normally before an active-table lookup.

Source

pub const fn with_probe_symbols(self, probe_symbols: NonZeroUsize) -> Self

Return this configuration with a new ordinary-comparison probe length.

Production callers should normally retain the measured default so short comparisons stay on the direct path.

Source

pub const fn min_lcp_symbols(&self) -> usize

Minimum exact LCP length, including any prefix already known by the merge, that is eligible for admission.

Source

pub const fn with_min_lcp_symbols(self, min_lcp_symbols: NonZeroUsize) -> Self

Return this configuration with a new exact-LCP admission threshold.

Source

pub const fn activate_after_entries(&self) -> usize

Number of learned entries required before a partition starts looking entries up.

Source

pub const fn with_activate_after_entries( self, activate_after_entries: NonZeroUsize, ) -> Self

Return this configuration with a new lazy-activation threshold.

If this exceeds Self::max_entries_per_partition, that partition remains in the training kernel for its entire lifetime.

Source

pub const fn max_entries_per_partition(&self) -> usize

Hard entry bound for one phase-4 partition table.

Source

pub const fn with_max_entries_per_partition( self, max_entries_per_partition: NonZeroUsize, ) -> Self

Return this configuration with a new per-partition entry bound.

Trait Implementations§

Source§

impl Clone for GeometricMemoizationConfig

Source§

fn clone(&self) -> GeometricMemoizationConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for GeometricMemoizationConfig

Source§

impl Debug for GeometricMemoizationConfig

Source§

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

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

impl Default for GeometricMemoizationConfig

Source§

fn default() -> Self

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

impl Eq for GeometricMemoizationConfig

Source§

impl From<GeometricMemoizationConfig> for LcpMemoizationPolicy

Source§

fn from(config: GeometricMemoizationConfig) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for GeometricMemoizationConfig

Source§

fn eq(&self, other: &GeometricMemoizationConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GeometricMemoizationConfig

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, 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<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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, 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.