Struct vectors::sparse::stack::SparseVector [] [src]

pub struct SparseVector<A> where
    A: Array
{ /* fields omitted */ }

A sparse stack-allocated multi-dimensional vector.

Methods

impl<T, A> SparseVector<A> where
    A: Array<Item = (usize, T)>, 
[src]

[src]

The number of components in self

[src]

true if self.len() == 0, otherwise false

Important traits for Iter<'a, T>
[src]

A borrowing iterator over self

Trait Implementations

impl<T, A, V> Add<V> for SparseVector<A> where
    T: Copy + Zero + Add<T, Output = T>,
    A: Array<Item = (usize, T)>,
    V: IntoIterator<Item = (usize, T)>,
    <V as IntoIterator>::IntoIter: ExactSizeIterator + OrderedMapIterator<Key = usize, Val = T>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<T, A, V> AddAssign<V> for SparseVector<A> where
    T: Copy + Zero + Add<T, Output = T>,
    A: Array<Item = (usize, T)>,
    V: IntoIterator<Item = (usize, T)>,
    <V as IntoIterator>::IntoIter: ExactSizeIterator + OrderedMapIterator<Key = usize, Val = T>, 
[src]

[src]

Performs the += operation.

impl<T, A, V> Sub<V> for SparseVector<A> where
    T: Copy + Zero + Sub<T, Output = T>,
    A: Array<Item = (usize, T)>,
    V: IntoIterator<Item = (usize, T)>,
    <V as IntoIterator>::IntoIter: ExactSizeIterator + OrderedMapIterator<Key = usize, Val = T>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<T, A, V> SubAssign<V> for SparseVector<A> where
    T: Copy + Zero + Sub<T, Output = T>,
    A: Array<Item = (usize, T)>,
    V: IntoIterator<Item = (usize, T)>,
    <V as IntoIterator>::IntoIter: ExactSizeIterator + OrderedMapIterator<Key = usize, Val = T>, 
[src]

[src]

Performs the -= operation.

impl<T, A> Mul<T> for SparseVector<A> where
    T: Copy + Zero + Mul<T, Output = T>,
    A: Array<Item = (usize, T)>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<T, A> MulAssign<T> for SparseVector<A> where
    T: Copy + Zero + Mul<T, Output = T>,
    A: Array<Item = (usize, T)>, 
[src]

[src]

Performs the *= operation.

impl<T, A> Div<T> for SparseVector<A> where
    T: Copy + Zero + Div<T, Output = T>,
    A: Array<Item = (usize, T)>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<T, A> DivAssign<T> for SparseVector<A> where
    T: Copy + Zero + Div<T, Output = T>,
    A: Array<Item = (usize, T)>, 
[src]

[src]

Performs the /= operation.

impl<T, A, V> MulAdd<T, V> for SparseVector<A> where
    T: Copy + Zero + MulAdd<T, T, Output = T>,
    A: Array<Item = (usize, T)>,
    V: IntoIterator<Item = (usize, T)>,
    <V as IntoIterator>::IntoIter: ExactSizeIterator + OrderedMapIterator<Key = usize, Val = T>, 
[src]

The resulting type after applying the fused multiply-add.

[src]

Performs the fused multiply-add operation.

impl<T, A, V> MulAddAssign<T, V> for SparseVector<A> where
    T: Copy + Zero + MulAdd<T, T, Output = T>,
    A: Array<Item = (usize, T)>,
    V: IntoIterator<Item = (usize, T)>,
    <V as IntoIterator>::IntoIter: ExactSizeIterator + OrderedMapIterator<Key = usize, Val = T>, 
[src]

[src]

Performs the fused multiply-add operation.

impl<T, A> Dot for SparseVector<A> where
    T: Copy + Add<T, Output = T> + Mul<T, Output = T> + Zero,
    A: Array<Item = (usize, T)>, 
[src]

The scalar type returned by self's dot product

[src]

Calculates the dot-product between self and rhs.

impl<T, A> Distance for SparseVector<A> where
    T: Copy + Signed,
    A: Array<Item = (usize, T)>, 
[src]

The scalar type returned by self's distance

[src]

Calculates the squared euclidian distance between self and rhs.

[src]

Calculates the euclidian distance between self and rhs.

impl<T, A> Debug for SparseVector<A> where
    T: Copy + Debug,
    A: Array<Item = (usize, T)>, 
[src]

[src]

Formats the value using the given formatter. Read more

impl<T, A> FromIterator<(usize, T)> for SparseVector<A> where
    A: Array<Item = (usize, T)>, 
[src]

[src]

Creates a value from an iterator. Read more

impl<T, A> IntoIterator for SparseVector<A> where
    A: Array<Item = (usize, T)>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a, T, A> IntoIterator for &'a SparseVector<A> where
    T: 'a + Copy,
    A: Array<Item = (usize, T)>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<T, A> Clone for SparseVector<A> where
    T: Clone,
    A: Array<Item = (usize, T)>, 
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T, A> PartialEq for SparseVector<A> where
    T: PartialEq,
    A: Array<Item = (usize, T)>, 
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<T, A> From<A> for SparseVector<A> where
    A: Array<Item = (usize, T)>, 
[src]

[src]

Performs the conversion.

impl<V, T, A> VectorOps<V, T> for SparseVector<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: Array<Item = (usize, T)>, 
[src]

impl<V, T, A> VectorAssignOps<V, T> for SparseVector<A> where
    Self: AddAssign<V> + SubAssign<V> + MulAssign<T> + DivAssign<T> + MulAddAssign<T, V>,
    T: Copy + NumAssign + MulAddAssign,
    A: Array<Item = (usize, T)>, 
[src]

impl<T, A> Vector<T> for SparseVector<A> where
    Self: VectorOps<Self, T>,
    T: Copy + PartialOrd + NumAssign + MulAdd<T, T, Output = T>,
    A: Array<Item = (usize, T)>, 
[src]

The type of the Vector's scalar components.

Auto Trait Implementations

impl<A> Send for SparseVector<A> where
    A: Send,
    <A as Array>::Index: Send

impl<A> Sync for SparseVector<A> where
    A: Sync,
    <A as Array>::Index: Sync