pub struct WeightedMetric<Q: Debug, C: Debug> {
pub metric: Box<dyn SimilarityMetric<Q, C>>,
pub weight: f64,
}Expand description
A weighted metric with its associated weight
Fields§
§metric: Box<dyn SimilarityMetric<Q, C>>§weight: f64Implementations§
Source§impl<Q: Debug, C: Debug> WeightedMetric<Q, C>
impl<Q: Debug, C: Debug> WeightedMetric<Q, C>
pub fn new<M: SimilarityMetric<Q, C> + 'static>(metric: M, weight: f64) -> Self
Auto Trait Implementations§
impl<Q, C> Freeze for WeightedMetric<Q, C>
impl<Q, C> !RefUnwindSafe for WeightedMetric<Q, C>
impl<Q, C> !Send for WeightedMetric<Q, C>
impl<Q, C> !Sync for WeightedMetric<Q, C>
impl<Q, C> Unpin for WeightedMetric<Q, C>
impl<Q, C> !UnwindSafe for WeightedMetric<Q, C>
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