Type Definition sprs::CsVecI [−][src]
type CsVecI<N, I = usize> = CsVecBase<Vec<I>, Vec<N>, N, I>;
Implementations
impl<N, I: SpIndex> CsVecI<N, I>
[src]
pub fn empty(dim: usize) -> Self
[src]
Create an empty CsVec
, which can be used for incremental construction
pub fn append(&mut self, ind: usize, val: N)
[src]
Append an element to the sparse vector. Used for incremental
building of the CsVec
. The append should preserve the structure
of the vector, ie the newly added index should be strictly greater
than the last element of indices.
Panics
- Panics if
ind
is lower or equal to the last element ofself.indices()
- Panics if
ind
is greater thanself.dim()
pub fn reserve(&mut self, size: usize)
[src]
Reserve size
additional non-zero values.
pub fn reserve_exact(&mut self, exact_size: usize)
[src]
Reserve exactly exact_size
non-zero values.
pub fn clear(&mut self)
[src]
Clear the underlying storage
Trait Implementations
impl<N, I> AbstractGroup<Additive> for CsVecI<N, I> where
N: Num + Copy + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
[src]
N: Num + Copy + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
impl<N, I> AbstractGroupAbelian<Additive> for CsVecI<N, I> where
N: Num + Copy + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
[src]
N: Num + Copy + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
pub fn prop_is_commutative_approx(args: (Self, Self)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
pub fn prop_is_commutative(args: (Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
impl<N, I> AbstractLoop<Additive> for CsVecI<N, I> where
N: Num + Copy + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
[src]
N: Num + Copy + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
impl<N, I> AbstractMagma<Additive> for CsVecI<N, I> where
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
[src]
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
impl<N, I> AbstractMonoid<Additive> for CsVecI<N, I> where
N: Num + Copy + for<'r> AddAssign<&'r N>,
I: SpIndex,
[src]
N: Num + Copy + for<'r> AddAssign<&'r N>,
I: SpIndex,
pub fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
pub fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool where
Self: Eq,
[src]
Self: Eq,
impl<N, I> AbstractQuasigroup<Additive> for CsVecI<N, I> where
N: Num + Clone + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
[src]
N: Num + Clone + for<'r> AddAssign<&'r N> + Neg<Output = N>,
I: SpIndex,
pub fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
pub fn prop_inv_is_latin_square(args: (Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
impl<N, I> AbstractSemigroup<Additive> for CsVecI<N, I> where
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
[src]
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
pub fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
pub fn prop_is_associative(args: (Self, Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
impl<N, I> Identity<Additive> for CsVecI<N, I> where
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
[src]
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
impl<N: Num + Clone + Neg<Output = N>, I: SpIndex> Neg for CsVecI<N, I>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<N, I> TwoSidedInverse<Additive> for CsVecI<N, I> where
N: Clone + Neg<Output = N> + Num,
I: SpIndex,
[src]
N: Clone + Neg<Output = N> + Num,
I: SpIndex,
fn two_sided_inverse(&self) -> Self
[src]
pub fn two_sided_inverse_mut(&mut self)
[src]
impl<N, I> Zero for CsVecI<N, I> where
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,
[src]
N: Num + Clone + for<'r> AddAssign<&'r N>,
I: SpIndex,