pub struct TernaryRBFSimilarity {
pub gamma: f64,
}Expand description
RBF-like similarity measures for ternary data.
Fields§
§gamma: f64Implementations§
Source§impl TernaryRBFSimilarity
impl TernaryRBFSimilarity
pub fn new(gamma: f64) -> Self
Sourcepub fn similarity(&self, a: &[Ternary], b: &[Ternary]) -> f64
pub fn similarity(&self, a: &[Ternary], b: &[Ternary]) -> f64
Compute similarity between two ternary sequences.
Sourcepub fn hamming_distance(&self, a: &[Ternary], b: &[Ternary]) -> usize
pub fn hamming_distance(&self, a: &[Ternary], b: &[Ternary]) -> usize
Hamming distance between ternary sequences.
Sourcepub fn weighted_distance(&self, a: &[Ternary], b: &[Ternary]) -> f64
pub fn weighted_distance(&self, a: &[Ternary], b: &[Ternary]) -> f64
Weighted Hamming: opposite signs cost more than one being zero.
Auto Trait Implementations§
impl Freeze for TernaryRBFSimilarity
impl RefUnwindSafe for TernaryRBFSimilarity
impl Send for TernaryRBFSimilarity
impl Sync for TernaryRBFSimilarity
impl Unpin for TernaryRBFSimilarity
impl UnsafeUnpin for TernaryRBFSimilarity
impl UnwindSafe for TernaryRBFSimilarity
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