Struct openalgebra::vector::Vector
[−]
[src]
pub struct Vector { /* fields omitted */ }
Methods
impl Vector
[src]
fn new<T>(data: T) -> Vector where
T: Into<Vec<f64>>,
[src]
T: Into<Vec<f64>>,
fn from_fn<F>(size: usize, f: F) -> Vector where
F: Fn(f64) -> f64,
[src]
F: Fn(f64) -> f64,
fn zeros(size: usize) -> Vector
[src]
fn ones(size: usize) -> Vector
[src]
fn size(&self) -> usize
[src]
fn data(&self) -> Vec<f64>
[src]
fn into_vec(self) -> Vec<f64>
[src]
fn get(&self, index: usize) -> Option<f64>
[src]
fn apply<F>(self, f: F) -> Vector where
F: Fn(f64) -> f64,
[src]
F: Fn(f64) -> f64,
fn apply_self<F>(&mut self, f: F) where
F: Fn(f64) -> f64,
[src]
F: Fn(f64) -> f64,
fn max(&self) -> f64
[src]
fn min(&self) -> f64
[src]
fn select(&self, idxs: &[usize]) -> Result<Vector, String>
[src]
fn dot(&self, rhs: &Vector) -> Result<f64, String>
[src]
fn sum(&self) -> f64
[src]
fn norm(&self, norm_type: Norm) -> f64
[src]
fn metric(&self, rhs: &Vector) -> Result<f64, String>
[src]
fn mean(&self) -> f64
[src]
fn variance(&self) -> f64
[src]
Trait Implementations
impl Display for Vector
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> From<&'a Vector> for Vector
[src]
impl From<Array> for Vector
[src]
impl From<f64> for Vector
[src]
impl<'a> From<&'a f64> for Vector
[src]
impl IntoIterator for Vector
[src]
type Item = f64
The type of the elements being iterated over.
type IntoIter = IntoIter<f64>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
Creates an iterator from a value. Read more
impl<'a> IntoIterator for &'a Vector
[src]
type Item = f64
The type of the elements being iterated over.
type IntoIter = IntoIter<f64>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
Creates an iterator from a value. Read more
impl PartialEq for Vector
[src]
fn eq(&self, other: &Vector) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Vector
[src]
impl<'a> Add<&'a Vector> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the +
operator.
fn add(self, rhs: &Vector) -> Self::Output
[src]
Performs the +
operation.
impl Add<Vector> for Vector
[src]
type Output = Vector
The resulting type after applying the +
operator.
fn add(self, rhs: Vector) -> Self::Output
[src]
Performs the +
operation.
impl<'a> Sub<&'a Vector> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the -
operator.
fn sub(self, rhs: &Vector) -> Self::Output
[src]
Performs the -
operation.
impl Sub<Vector> for Vector
[src]
type Output = Vector
The resulting type after applying the -
operator.
fn sub(self, rhs: Vector) -> Self::Output
[src]
Performs the -
operation.
impl<'a> Div<&'a Vector> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the /
operator.
fn div(self, rhs: &Vector) -> Self::Output
[src]
Performs the /
operation.
impl Div<Vector> for Vector
[src]
type Output = Vector
The resulting type after applying the /
operator.
fn div(self, rhs: Vector) -> Self::Output
[src]
Performs the /
operation.
impl<'a> Mul<&'a Vector> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: &Vector) -> Self::Output
[src]
Performs the *
operation.
impl Mul<Vector> for Vector
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector) -> Self::Output
[src]
Performs the *
operation.
impl<'a> Rem<&'a Vector> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the %
operator.
fn rem(self, rhs: &Vector) -> Self::Output
[src]
Performs the %
operation.
impl Rem<Vector> for Vector
[src]
type Output = Vector
The resulting type after applying the %
operator.
fn rem(self, rhs: Vector) -> Self::Output
[src]
Performs the %
operation.
impl AddAssign<Vector> for Vector
[src]
fn add_assign(&mut self, rhs: Vector)
[src]
Performs the +=
operation.
impl SubAssign<Vector> for Vector
[src]
fn sub_assign(&mut self, rhs: Vector)
[src]
Performs the -=
operation.
impl DivAssign<Vector> for Vector
[src]
fn div_assign(&mut self, rhs: Vector)
[src]
Performs the /=
operation.
impl MulAssign<Vector> for Vector
[src]
fn mul_assign(&mut self, rhs: Vector)
[src]
Performs the *=
operation.
impl RemAssign<Vector> for Vector
[src]
fn rem_assign(&mut self, rhs: Vector)
[src]
Performs the %=
operation.
impl<'a> Add<&'a f64> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the +
operator.
fn add(self, rhs: &f64) -> Self::Output
[src]
Performs the +
operation.
impl Add<f64> for Vector
[src]
type Output = Vector
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> Self::Output
[src]
Performs the +
operation.
impl<'a> Sub<&'a f64> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the -
operator.
fn sub(self, rhs: &f64) -> Self::Output
[src]
Performs the -
operation.
impl Sub<f64> for Vector
[src]
type Output = Vector
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> Self::Output
[src]
Performs the -
operation.
impl<'a> Div<&'a f64> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the /
operator.
fn div(self, rhs: &f64) -> Self::Output
[src]
Performs the /
operation.
impl Div<f64> for Vector
[src]
type Output = Vector
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> Self::Output
[src]
Performs the /
operation.
impl<'a> Mul<&'a f64> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: &f64) -> Self::Output
[src]
Performs the *
operation.
impl Mul<f64> for Vector
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Self::Output
[src]
Performs the *
operation.
impl<'a> Rem<&'a f64> for &'a Vector
[src]
type Output = Vector
The resulting type after applying the %
operator.
fn rem(self, rhs: &f64) -> Self::Output
[src]
Performs the %
operation.
impl Rem<f64> for Vector
[src]
type Output = Vector
The resulting type after applying the %
operator.
fn rem(self, rhs: f64) -> Self::Output
[src]
Performs the %
operation.
impl AddAssign<f64> for Vector
[src]
fn add_assign(&mut self, rhs: f64)
[src]
Performs the +=
operation.
impl SubAssign<f64> for Vector
[src]
fn sub_assign(&mut self, rhs: f64)
[src]
Performs the -=
operation.
impl DivAssign<f64> for Vector
[src]
fn div_assign(&mut self, rhs: f64)
[src]
Performs the /=
operation.
impl MulAssign<f64> for Vector
[src]
fn mul_assign(&mut self, rhs: f64)
[src]
Performs the *=
operation.
impl RemAssign<f64> for Vector
[src]
fn rem_assign(&mut self, rhs: f64)
[src]
Performs the %=
operation.
impl Neg for Vector
[src]
type Output = Vector
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Performs the unary -
operation.