pub struct Sketcher { /* private fields */ }
Expand description
An object containing the sketch parameters.
Contains internal state to optimize the implementation when sketching multiple similar sequences.
Implementations§
Source§impl Sketcher
impl Sketcher
Sourcepub fn default(k: usize) -> Self
pub fn default(k: usize) -> Self
Default sketcher that very fast at comparisons, but 20% slower at sketching. Use for >= 50000 seqs, and safe default when input sequences are > 500’000 characters.
When sequences are < 100’000 characters, inaccuracies may occur due to empty buckets.
Sourcepub fn default_fast_sketching(k: usize) -> Self
pub fn default_fast_sketching(k: usize) -> Self
Default sketcher that is fast at sketching, but somewhat slower at comparisons. Use for <= 5000 seqs, or when input sequences are < 100’000 characters.
Source§impl Sketcher
impl Sketcher
Sourcepub fn bottom_sketch<'s, S: Seq<'s>>(&self, seq: S) -> BottomSketch
pub fn bottom_sketch<'s, S: Seq<'s>>(&self, seq: S) -> BottomSketch
Return the s
smallest u32
k-mer hashes.
Prefer Sketcher::sketch
instead, which is much faster and just as
accurate when input sequences are not too short.
Sourcepub fn sketch<'s, S: Seq<'s>>(&self, seq: S) -> BucketSketch
pub fn sketch<'s, S: Seq<'s>>(&self, seq: S) -> BucketSketch
s-buckets sketch. Splits the hashes into s
buckets and returns the smallest hash per bucket.
Buckets are determined via the remainder mod s
.
Auto Trait Implementations§
impl !Freeze for Sketcher
impl RefUnwindSafe for Sketcher
impl Send for Sketcher
impl Sync for Sketcher
impl Unpin for Sketcher
impl UnwindSafe for Sketcher
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> 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>
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