Vector

Trait Vector 

Source
pub trait Vector {
    // Required method
    fn values(&self) -> &Vec<f64>;

    // Provided methods
    fn dim(&self) -> usize { ... }
    fn square_dist<T: Vector>(&self, other: &T) -> Result<f64, NrpsError> { ... }
    fn dist<T: Vector>(&self, other: &T) -> Result<f64, NrpsError> { ... }
    fn similarity<T: Vector>(&self, other: &T) -> Result<f64, NrpsError> { ... }
}

Required Methods§

Source

fn values(&self) -> &Vec<f64>

Provided Methods§

Source

fn dim(&self) -> usize

Source

fn square_dist<T: Vector>(&self, other: &T) -> Result<f64, NrpsError>

Source

fn dist<T: Vector>(&self, other: &T) -> Result<f64, NrpsError>

Source

fn similarity<T: Vector>(&self, other: &T) -> Result<f64, NrpsError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§