pub struct FuzzyMatcher { /* private fields */ }Expand description
Fuzzy comparison functions
Implementations§
Source§impl FuzzyMatcher
impl FuzzyMatcher
Sourcepub fn with_config(config: FuzzyConfig) -> Self
pub fn with_config(config: FuzzyConfig) -> Self
Create a fuzzy matcher with custom configuration
Sourcepub fn fuzzy_equal(&self, a: f64, b: f64, tolerance: Option<f64>) -> bool
pub fn fuzzy_equal(&self, a: f64, b: f64, tolerance: Option<f64>) -> bool
Fuzzy equality comparison
Sourcepub fn fuzzy_greater(&self, a: f64, b: f64, tolerance: Option<f64>) -> bool
pub fn fuzzy_greater(&self, a: f64, b: f64, tolerance: Option<f64>) -> bool
Fuzzy greater than comparison
Sourcepub fn fuzzy_less(&self, a: f64, b: f64, tolerance: Option<f64>) -> bool
pub fn fuzzy_less(&self, a: f64, b: f64, tolerance: Option<f64>) -> bool
Fuzzy less than comparison
Sourcepub fn adaptive_tolerance(&self, values: &[f64]) -> f64
pub fn adaptive_tolerance(&self, values: &[f64]) -> f64
Calculate adaptive tolerance based on volatility
Sourcepub fn match_pattern(&self, conditions: &[(bool, f64)], threshold: f64) -> bool
pub fn match_pattern(&self, conditions: &[(bool, f64)], threshold: f64) -> bool
Fuzzy pattern matching with weighted conditions
Sourcepub fn sequence_similarity(&self, seq1: &[f64], seq2: &[f64]) -> f64
pub fn sequence_similarity(&self, seq1: &[f64], seq2: &[f64]) -> f64
Calculate similarity score between two numeric sequences
Trait Implementations§
Source§impl Clone for FuzzyMatcher
impl Clone for FuzzyMatcher
Source§fn clone(&self) -> FuzzyMatcher
fn clone(&self) -> FuzzyMatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FuzzyMatcher
impl Debug for FuzzyMatcher
Auto Trait Implementations§
impl Freeze for FuzzyMatcher
impl RefUnwindSafe for FuzzyMatcher
impl Send for FuzzyMatcher
impl Sync for FuzzyMatcher
impl Unpin for FuzzyMatcher
impl UnsafeUnpin for FuzzyMatcher
impl UnwindSafe for FuzzyMatcher
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more