pub trait VecFloatExt {
// Required methods
fn vecadd(&mut self, x: &[f64], c: f64);
fn vecdot(&self, other: &[f64]) -> f64;
fn veccpy(&mut self, x: &[f64]);
fn vecncpy(&mut self, x: &[f64]);
fn vecdiff(&mut self, x: &[f64], y: &[f64]);
fn vecscale(&mut self, c: f64);
fn vec2norm(&self) -> f64;
fn vec2norminv(&self) -> f64;
fn vecdist_squared(&self, other: &[f64]) -> f64;
// Provided method
fn vecdist(&self, other: &[f64]) -> f64 { ... }
}
Expand description
Abstracting simple vector based math operations
Required Methods§
Sourcefn vec2norminv(&self) -> f64
fn vec2norminv(&self) -> f64
1 / ||x||
Sourcefn vecdist_squared(&self, other: &[f64]) -> f64
fn vecdist_squared(&self, other: &[f64]) -> f64
d = ||a-b||^2
Provided Methods§
Implementations on Foreign Types§
Source§impl VecFloatExt for [f64]
impl VecFloatExt for [f64]
Source§fn vec2norminv(&self) -> f64
fn vec2norminv(&self) -> f64
1/||x||
Source§fn vecdist_squared(&self, other: &[f64]) -> f64
fn vecdist_squared(&self, other: &[f64]) -> f64
d = ||a-b||^2