[−][src]Trait vecfx::VecFloatExt
Abstracting simple vector based math operations
Required methods
fn vecadd(&mut self, x: &[f64], c: f64)
y += c*x
fn vecdot(&self, other: &[f64]) -> f64
vector dot product s = x.dot(y)
fn veccpy(&mut self, x: &[f64])
y = z
fn vecncpy(&mut self, x: &[f64])
y = -x
fn vecdiff(&mut self, x: &[f64], y: &[f64])
z = x - y
fn vecscale(&mut self, c: f64)
y *= c
fn vec2norm(&self) -> f64
||x||
fn vec2norminv(&self) -> f64
1 / ||x||
fn vecdist_squared(&self, other: &[f64]) -> f64
d = ||a-b||^2
Provided methods
Loading content...Implementations on Foreign Types
impl VecFloatExt for [f64]
[src]
fn vecadd(&mut self, x: &[f64], c: f64)
[src]
y += c*x
fn vecdot(&self, other: &[f64]) -> f64
[src]
s = y.dot(x)
fn vecscale(&mut self, c: f64)
[src]
y *= c
fn veccpy(&mut self, x: &[f64])
[src]
y = x
fn vecncpy(&mut self, x: &[f64])
[src]
y = -x
fn vecdiff(&mut self, x: &[f64], y: &[f64])
[src]
z = x - y
fn vec2norm(&self) -> f64
[src]
||x||
fn vec2norminv(&self) -> f64
[src]
1/||x||
fn vecdist_squared(&self, other: &[f64]) -> f64
[src]
d = ||a-b||^2