pub struct MinimizersControlMapBuilder { /* private fields */ }Expand description
Builder for constructing a MinimizersControlMap
This two-phase builder collects minimizers during construction, then builds the MPHF once all minimizers are known.
Implementations§
Source§impl MinimizersControlMapBuilder
impl MinimizersControlMapBuilder
Sourcepub fn add_minimizer(&mut self, minimizer: u64) -> usize
pub fn add_minimizer(&mut self, minimizer: u64) -> usize
Add a minimizer with initial control info
Sourcepub fn increment_count(&mut self, minimizer: u64)
pub fn increment_count(&mut self, minimizer: u64)
Increment count for a minimizer
Sourcepub fn set_bucket_type(&mut self, minimizer: u64, bucket_type: BucketType)
pub fn set_bucket_type(&mut self, minimizer: u64, bucket_type: BucketType)
Set bucket type for a minimizer
Sourcepub fn get_control_mut(
&mut self,
minimizer: u64,
) -> Option<&mut MinimizerControl>
pub fn get_control_mut( &mut self, minimizer: u64, ) -> Option<&mut MinimizerControl>
Get mutable access to control info for a minimizer
Sourcepub fn finalize_bucket_types(
&mut self,
threshold_sparse: u32,
threshold_heavy: u32,
)
pub fn finalize_bucket_types( &mut self, threshold_sparse: u32, threshold_heavy: u32, )
Classify bucket types based on count thresholds
Sourcepub fn build(
self,
_c: u16,
_alpha: f64,
) -> Result<(MinimizersControlMap, Vec<usize>)>
pub fn build( self, _c: u16, _alpha: f64, ) -> Result<(MinimizersControlMap, Vec<usize>)>
Build the final MinimizersControlMap with MPHF
Returns the control map AND a mapping from MPHF index to bucket_id. This mapping is used to reorder control_codewords to MPHF order.
§Arguments
c- Relative level size (percentage, typically 100)alpha- Load factor (kept for C++ API parity, not used by ph)
Sourcepub fn num_minimizers(&self) -> usize
pub fn num_minimizers(&self) -> usize
Get the number of unique minimizers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MinimizersControlMapBuilder
impl RefUnwindSafe for MinimizersControlMapBuilder
impl Send for MinimizersControlMapBuilder
impl Sync for MinimizersControlMapBuilder
impl Unpin for MinimizersControlMapBuilder
impl UnsafeUnpin for MinimizersControlMapBuilder
impl UnwindSafe for MinimizersControlMapBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.