pub enum FuzzyQuery {
Vector(Vec<f64>),
And(Box<FuzzyQuery>, Box<FuzzyQuery>, TNorm),
Or(Box<FuzzyQuery>, Box<FuzzyQuery>, TConorm),
Not(Box<FuzzyQuery>),
}Expand description
Represents a fuzzy logic search query over vector space.
Variants§
Vector(Vec<f64>)
A single target vector.
And(Box<FuzzyQuery>, Box<FuzzyQuery>, TNorm)
Fuzzy intersection (AND) using a t-norm.
Or(Box<FuzzyQuery>, Box<FuzzyQuery>, TConorm)
Fuzzy union (OR) using a t-conorm.
Not(Box<FuzzyQuery>)
Fuzzy negation (NOT).
Implementations§
Source§impl FuzzyQuery
impl FuzzyQuery
Sourcepub fn extract_vectors(&self, out: &mut Vec<Vec<f64>>)
pub fn extract_vectors(&self, out: &mut Vec<Vec<f64>>)
Flatten and extract all vectors in the query graph to a list.
Sourcepub fn evaluate_indexed<F>(&self, counter: &mut usize, distance_fn: &F) -> f32
pub fn evaluate_indexed<F>(&self, counter: &mut usize, distance_fn: &F) -> f32
Evaluates the FuzzyQuery for a database item yielding a final membership score [0, 1].
distance_fn provides the distance from the database item to a specific query node via its traversal index.
Trait Implementations§
Source§impl Clone for FuzzyQuery
impl Clone for FuzzyQuery
Source§fn clone(&self) -> FuzzyQuery
fn clone(&self) -> FuzzyQuery
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 moreAuto Trait Implementations§
impl Freeze for FuzzyQuery
impl RefUnwindSafe for FuzzyQuery
impl Send for FuzzyQuery
impl Sync for FuzzyQuery
impl Unpin for FuzzyQuery
impl UnsafeUnpin for FuzzyQuery
impl UnwindSafe for FuzzyQuery
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request