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§
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>
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.