Struct vectors::dense::stack::DenseVector
[−]
[src]
pub struct DenseVector<A> where
A: Array, { /* fields omitted */ }
A dense stack-allocated multi-dimensional vector.
Methods
impl<T, A> DenseVector<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
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, A, V> Add<V> for DenseVector<A> where
T: AddAssign<T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: AddAssign<T>,
A: Array<Item = 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, A, V> AddAssign<V> for DenseVector<A> where
T: AddAssign<T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: AddAssign<T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
fn add_assign(&mut self, rhs: V)
[src]
Performs the +=
operation.
impl<T, A, V> Sub<V> for DenseVector<A> where
T: SubAssign<T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: SubAssign<T>,
A: Array<Item = 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, A, V> SubAssign<V> for DenseVector<A> where
T: SubAssign<T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: SubAssign<T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
fn sub_assign(&mut self, rhs: V)
[src]
Performs the -=
operation.
impl<T, A> Mul<T> for DenseVector<A> where
T: Copy + MulAssign<T>,
A: Array<Item = T>,
[src]
T: Copy + MulAssign<T>,
A: Array<Item = T>,
type Output = DenseVector<A>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output
[src]
Performs the *
operation.
impl<T, A> MulAssign<T> for DenseVector<A> where
T: Copy + MulAssign<T>,
A: Array<Item = T>,
[src]
T: Copy + MulAssign<T>,
A: Array<Item = T>,
fn mul_assign(&mut self, rhs: T)
[src]
Performs the *=
operation.
impl<T, A> Div<T> for DenseVector<A> where
T: Copy + DivAssign<T>,
A: Array<Item = T>,
[src]
T: Copy + DivAssign<T>,
A: Array<Item = T>,
type Output = DenseVector<A>
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output
[src]
Performs the /
operation.
impl<T, A> DivAssign<T> for DenseVector<A> where
T: Copy + DivAssign<T>,
A: Array<Item = T>,
[src]
T: Copy + DivAssign<T>,
A: Array<Item = T>,
fn div_assign(&mut self, rhs: T)
[src]
Performs the /=
operation.
impl<T, A, V> MulAdd<T, V> for DenseVector<A> where
T: Copy + MulAddAssign<T, T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: Copy + MulAddAssign<T, T>,
A: Array<Item = 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, A, V> MulAddAssign<T, V> for DenseVector<A> where
T: Copy + MulAddAssign<T, T>,
A: Array<Item = T>,
V: IntoIterator<Item = (usize, T)>,
<V as IntoIterator>::IntoIter: ExactSizeIterator,
[src]
T: Copy + MulAddAssign<T, T>,
A: Array<Item = 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<T, A> Dot for DenseVector<A> where
T: Copy + Num,
A: Array<Item = T>,
[src]
T: Copy + Num,
A: Array<Item = T>,
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, A> Distance for DenseVector<A> where
T: Copy + Signed,
A: Array<Item = T>,
[src]
T: Copy + Signed,
A: Array<Item = T>,
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, A> Debug for DenseVector<A> where
T: Debug,
A: Array<Item = T>,
[src]
T: Debug,
A: Array<Item = T>,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T, A> FromIterator<T> for DenseVector<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
Creates a value from an iterator. Read more
impl<T, A> IntoIterator for DenseVector<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
type Item = <Self::IntoIter as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = IntoIter<ArrayVec<A>>
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, A> IntoIterator for &'a DenseVector<A> where
T: 'a + Copy,
A: Array<Item = T>,
[src]
T: 'a + Copy,
A: Array<Item = T>,
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, A> Clone for DenseVector<A> where
T: Clone,
A: Array<Item = T>,
[src]
T: Clone,
A: Array<Item = T>,
fn clone(&self) -> Self
[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, A> PartialEq for DenseVector<A> where
T: PartialEq,
A: Array<Item = T>,
[src]
T: PartialEq,
A: Array<Item = T>,
fn eq(&self, other: &Self) -> 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<T, A> From<A> for DenseVector<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
impl<T, A> From<ArrayVec<A>> for DenseVector<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
impl<V, T, A> VectorOps<V, T> for DenseVector<A> 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>,
A: Copy + Array<Item = 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>,
A: Copy + Array<Item = T>,
impl<V, T, A> VectorAssignOps<V, T> for DenseVector<A> where
Self: AddAssign<V> + SubAssign<V> + MulAssign<T> + DivAssign<T> + MulAddAssign<T, V>,
T: Copy + NumAssign + MulAddAssign,
A: Copy + Array<Item = T>,
[src]
Self: AddAssign<V> + SubAssign<V> + MulAssign<T> + DivAssign<T> + MulAddAssign<T, V>,
T: Copy + NumAssign + MulAddAssign,
A: Copy + Array<Item = T>,
impl<T, A> Vector<T> for DenseVector<A> where
Self: VectorOps<Self, T>,
T: Copy + NumAssign + MulAdd<T, T, Output = T>,
A: Copy + Array<Item = T>,
[src]
Self: VectorOps<Self, T>,
T: Copy + NumAssign + MulAdd<T, T, Output = T>,
A: Copy + Array<Item = T>,
type Scalar = T
The type of the Vector
's scalar components.