Trait vecfx::VecFloatExt
source · 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