pub struct HardStrategy;Expand description
Hard-decision strategy (Hamming distance).
Trait Implementations§
Source§impl DecodingStrategy for HardStrategy
impl DecodingStrategy for HardStrategy
Source§fn from_intensities(intensities: &[f64], thresholds: &[f64]) -> Self::Code
fn from_intensities(intensities: &[f64], thresholds: &[f64]) -> Self::Code
Convert intensities and thresholds into a code.
Source§fn distance(code: &Self::Code, target: u64) -> u32
fn distance(code: &Self::Code, target: u64) -> u32
Compute the “distance” between the extracted code and a dictionary target. Read more
Source§fn decode(
code: &Self::Code,
decoder: &(impl TagDecoder + ?Sized),
max_error: u32,
) -> Option<(u32, u32, u8)>
fn decode( code: &Self::Code, decoder: &(impl TagDecoder + ?Sized), max_error: u32, ) -> Option<(u32, u32, u8)>
Decode the code into an ID using the provided decoder.
Source§fn to_debug_bits(code: &Self::Code) -> u64
fn to_debug_bits(code: &Self::Code) -> u64
Convert the code to a debug bitstream (u64).
Auto Trait Implementations§
impl Freeze for HardStrategy
impl RefUnwindSafe for HardStrategy
impl Send for HardStrategy
impl Sync for HardStrategy
impl Unpin for HardStrategy
impl UnsafeUnpin for HardStrategy
impl UnwindSafe for HardStrategy
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> 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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.