Struct vectors::dense::heap::DenseVector
[−]
[src]
pub struct DenseVector<T> { /* fields omitted */ }
A dense heap-allocated multi-dimensional vector.
Methods
impl<T> DenseVector<T>
[src]
pub fn len(&self) -> usize
[src]
The number of components in self
pub fn is_empty(&self) -> bool
[src]
true
if self.len() == 0
, otherwise false
ⓘImportant traits for Iter<'a, T>pub fn iter<'a>(&'a self) -> Iter<'a, T>
[src]
A borrowing iterator over self
Trait Implementations
impl<T, V> Add<V> for DenseVector<T> where
T: AddAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: AddAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: V) -> Self::Output
[src]
Performs the +
operation.
impl<T, V> AddAssign<V> for DenseVector<T> where
T: AddAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: AddAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
fn add_assign(&mut self, rhs: V)
[src]
Performs the +=
operation.
impl<T, V> Sub<V> for DenseVector<T> where
T: SubAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: SubAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: V) -> Self::Output
[src]
Performs the -
operation.
impl<T, V> SubAssign<V> for DenseVector<T> where
T: SubAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: SubAssign<T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
fn sub_assign(&mut self, rhs: V)
[src]
Performs the -=
operation.
impl<T> Mul<T> for DenseVector<T> where
T: Copy + MulAssign<T>,
[src]
T: Copy + MulAssign<T>,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output
[src]
Performs the *
operation.
impl<T> MulAssign<T> for DenseVector<T> where
T: Copy + MulAssign<T>,
[src]
T: Copy + MulAssign<T>,
fn mul_assign(&mut self, rhs: T)
[src]
Performs the *=
operation.
impl<T> Div<T> for DenseVector<T> where
T: Copy + DivAssign<T>,
[src]
T: Copy + DivAssign<T>,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output
[src]
Performs the /
operation.
impl<T> DivAssign<T> for DenseVector<T> where
T: Copy + DivAssign<T>,
[src]
T: Copy + DivAssign<T>,
fn div_assign(&mut self, rhs: T)
[src]
Performs the /=
operation.
impl<T, V> MulAdd<T, V> for DenseVector<T> where
T: Copy + MulAddAssign<T, T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: Copy + MulAddAssign<T, T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
type Output = Self
The resulting type after applying the fused multiply-add.
fn mul_add(self, a: T, b: V) -> Self::Output
[src]
Performs the fused multiply-add operation.
impl<T, V> MulAddAssign<T, V> for DenseVector<T> where
T: Copy + MulAddAssign<T, T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: Copy + MulAddAssign<T, T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
fn mul_add_assign(&mut self, a: T, b: V)
[src]
Performs the fused multiply-add operation.
impl<'a, T> Dot for DenseVector<T> where
T: Copy + Num,
[src]
T: Copy + Num,
type Scalar = T
The scalar type returned by self
's dot product
fn dot(&self, rhs: &Self) -> Self::Scalar
[src]
Calculates the dot-product between self
and rhs
.
impl<T> Distance for DenseVector<T> where
T: Copy + Signed,
[src]
T: Copy + Signed,
type Scalar = T
The scalar type returned by self
's distance
fn squared_distance(&self, rhs: &Self) -> Self::Scalar
[src]
Calculates the squared euclidian distance between self
and rhs
.
fn distance(&self, rhs: &Self) -> Self::Scalar where
Self::Scalar: Real,
[src]
Self::Scalar: Real,
Calculates the euclidian distance between self
and rhs
.
impl<T> Debug for DenseVector<T> where
T: Debug,
[src]
T: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> FromIterator<T> for DenseVector<T>
[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
Creates a value from an iterator. Read more
impl<T> IntoIterator for DenseVector<T>
[src]
type Item = <Self::IntoIter as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = IntoIter<Vec<T>>
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, T> IntoIterator for &'a DenseVector<T> where
T: 'a + Copy,
[src]
T: 'a + Copy,
type Item = <Self::IntoIter as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
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<T: Clone> Clone for DenseVector<T>
[src]
fn clone(&self) -> DenseVector<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for DenseVector<T>
[src]
fn eq(&self, __arg_0: &DenseVector<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DenseVector<T>) -> bool
[src]
This method tests for !=
.
impl<T> From<Vec<T>> for DenseVector<T>
[src]
impl<V, T> VectorOps<V, T> for DenseVector<T> where
Self: Add<V, Output = Self> + Sub<V, Output = Self> + Mul<T, Output = Self> + Div<T, Output = Self> + MulAdd<T, V, Output = Self>,
T: Copy + NumAssign + MulAdd<T, T, Output = T>,
[src]
Self: Add<V, Output = Self> + Sub<V, Output = Self> + Mul<T, Output = Self> + Div<T, Output = Self> + MulAdd<T, V, Output = Self>,
T: Copy + NumAssign + MulAdd<T, T, Output = T>,
impl<V, T> VectorAssignOps<V, T> for DenseVector<T> where
Self: AddAssign<V> + SubAssign<V> + MulAssign<T> + DivAssign<T> + MulAddAssign<T, V>,
T: Copy + NumAssign + MulAddAssign,
[src]
Self: AddAssign<V> + SubAssign<V> + MulAssign<T> + DivAssign<T> + MulAddAssign<T, V>,
T: Copy + NumAssign + MulAddAssign,
impl<T> Vector<T> for DenseVector<T> where
Self: VectorOps<Self, T>,
T: Copy + NumAssign + MulAdd<T, T, Output = T>,
[src]
Self: VectorOps<Self, T>,
T: Copy + NumAssign + MulAdd<T, T, Output = T>,
type Scalar = T
The type of the Vector
's scalar components.
Auto Trait Implementations
impl<T> Send for DenseVector<T> where
T: Send,
T: Send,
impl<T> Sync for DenseVector<T> where
T: Sync,
T: Sync,