pub trait VectorExt {
// Required methods
fn zero(n: usize) -> Vec<f64>;
fn nan(n: usize) -> Vec<f64>;
fn is_finite(&self) -> bool;
fn dot(&self, a: &Self) -> f64;
fn norm_max(&self) -> f64;
fn norm_l2(&self) -> f64;
fn add_vec(&self, b: &Self) -> Vec<f64>;
fn sub_vec(&self, b: &Self) -> Vec<f64>;
fn dist_l2(&self, b: &Self) -> f64;
fn dist_max(&self, b: &Self) -> f64;
fn display(&self) -> impl Display;
}
Expand description
Basic linear algebra functions.
Required Methods§
fn zero(n: usize) -> Vec<f64>
fn nan(n: usize) -> Vec<f64>
fn is_finite(&self) -> bool
fn dot(&self, a: &Self) -> f64
fn norm_max(&self) -> f64
fn norm_l2(&self) -> f64
fn add_vec(&self, b: &Self) -> Vec<f64>
fn sub_vec(&self, b: &Self) -> Vec<f64>
fn dist_l2(&self, b: &Self) -> f64
fn dist_max(&self, b: &Self) -> f64
fn display(&self) -> impl Display
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.