#[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
impl GeometricMemoizationConfig
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
The default configuration measured on ruSTAR-shaped GRCh38 plus GENCODE input.
Sourcepub const fn probe_symbols(&self) -> usize
pub const fn probe_symbols(&self) -> usize
Number of symbols compared normally before an active-table lookup.
Sourcepub const fn with_probe_symbols(self, probe_symbols: NonZeroUsize) -> Self
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.
Sourcepub const fn min_lcp_symbols(&self) -> usize
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.
Sourcepub const fn with_min_lcp_symbols(self, min_lcp_symbols: NonZeroUsize) -> Self
pub const fn with_min_lcp_symbols(self, min_lcp_symbols: NonZeroUsize) -> Self
Return this configuration with a new exact-LCP admission threshold.
Sourcepub const fn activate_after_entries(&self) -> usize
pub const fn activate_after_entries(&self) -> usize
Number of learned entries required before a partition starts looking entries up.
Sourcepub const fn with_activate_after_entries(
self,
activate_after_entries: NonZeroUsize,
) -> Self
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.
Sourcepub const fn max_entries_per_partition(&self) -> usize
pub const fn max_entries_per_partition(&self) -> usize
Hard entry bound for one phase-4 partition table.
Sourcepub const fn with_max_entries_per_partition(
self,
max_entries_per_partition: NonZeroUsize,
) -> Self
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
impl Clone for GeometricMemoizationConfig
Source§fn clone(&self) -> GeometricMemoizationConfig
fn clone(&self) -> GeometricMemoizationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GeometricMemoizationConfig
Source§impl Debug for GeometricMemoizationConfig
impl Debug for GeometricMemoizationConfig
Source§impl Default for GeometricMemoizationConfig
impl Default for GeometricMemoizationConfig
impl Eq for GeometricMemoizationConfig
Source§impl From<GeometricMemoizationConfig> for LcpMemoizationPolicy
impl From<GeometricMemoizationConfig> for LcpMemoizationPolicy
Source§fn from(config: GeometricMemoizationConfig) -> Self
fn from(config: GeometricMemoizationConfig) -> Self
impl StructuralPartialEq for GeometricMemoizationConfig
Auto Trait Implementations§
impl Freeze for GeometricMemoizationConfig
impl RefUnwindSafe for GeometricMemoizationConfig
impl Send for GeometricMemoizationConfig
impl Sync for GeometricMemoizationConfig
impl Unpin for GeometricMemoizationConfig
impl UnsafeUnpin for GeometricMemoizationConfig
impl UnwindSafe for GeometricMemoizationConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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