[][src]Struct oxygengine_physics_2d::prelude::nalgebra::CsMatrix

pub struct CsMatrix<N, R = Dynamic, C = Dynamic, S = CsVecStorage<N, R, C>> where
    C: Dim,
    N: Scalar,
    R: Dim,
    S: CsStorage<N, R, C>, 
{ /* fields omitted */ }

A compressed sparse column matrix.

Implementations

impl<N, R, C> CsMatrix<N, R, C, CsVecStorage<N, R, C>> where
    C: Dim,
    N: Scalar,
    R: Dim,
    DefaultAllocator: Allocator<usize, C, U1>, 
[src]

pub fn new_uninitialized_generic(
    nrows: R,
    ncols: C,
    nvals: usize
) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
[src]

Creates a new compressed sparse column matrix with the specified dimension and nvals possible non-zero values.

impl<N, R, C, S> CsMatrix<N, R, C, S> where
    C: Dim,
    N: Scalar,
    R: Dim,
    S: CsStorage<N, R, C>, 
[src]

pub fn len(&self) -> usize[src]

The size of the data buffer.

pub fn nrows(&self) -> usize[src]

The number of rows of this matrix.

pub fn ncols(&self) -> usize[src]

The number of rows of this matrix.

pub fn shape(&self) -> (usize, usize)[src]

The shape of this matrix.

pub fn is_square(&self) -> bool[src]

Whether this matrix is square or not.

pub fn is_sorted(&self) -> bool[src]

Should always return true.

This method is generally used for debugging and should typically not be called in user code. This checks that the row inner indices of this matrix are sorted. It takes O(n) time, where nisself.len(). All operations of CSC matrices on nalgebra assume, and will return, sorted indices. If at any time this is_sortedmethod returnsfalse`, then, something went wrong and an issue should be open on the nalgebra repository with details on how to reproduce this.

pub fn transpose(&self) -> CsMatrix<N, C, R, CsVecStorage<N, C, R>> where
    DefaultAllocator: Allocator<usize, R, U1>, 
[src]

Computes the transpose of this sparse matrix.

impl<N, R, C, S> CsMatrix<N, R, C, S> where
    C: Dim,
    N: Scalar,
    R: Dim,
    S: CsStorageMut<N, R, C>, 
[src]

pub fn values_mut(&mut self) -> impl Iterator<Item = &mut N>[src]

Iterator through all the mutable values of this sparse matrix.

impl<'a, N> CsMatrix<N, Dynamic, Dynamic, CsVecStorage<N, Dynamic, Dynamic>> where
    N: Scalar + Zero + ClosedAdd<N>, 
[src]

pub fn from_triplet(
    nrows: usize,
    ncols: usize,
    irows: &[usize],
    icols: &[usize],
    vals: &[N]
) -> CsMatrix<N, Dynamic, Dynamic, CsVecStorage<N, Dynamic, Dynamic>>
[src]

Creates a column-compressed sparse matrix from a sparse matrix in triplet form.

impl<'a, N, R, C> CsMatrix<N, R, C, CsVecStorage<N, R, C>> where
    C: Dim,
    N: Scalar + Zero + ClosedAdd<N>,
    R: Dim,
    DefaultAllocator: Allocator<usize, C, U1>,
    DefaultAllocator: Allocator<N, R, U1>, 
[src]

pub fn from_triplet_generic(
    nrows: R,
    ncols: C,
    irows: &[usize],
    icols: &[usize],
    vals: &[N]
) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
[src]

Creates a column-compressed sparse matrix from a sparse matrix in triplet form.

impl<N, D, S> CsMatrix<N, D, D, S> where
    D: Dim,
    N: RealField,
    S: CsStorage<N, D, D>, 
[src]

pub fn solve_lower_triangular<R2, C2, S2>(
    &self,
    b: &Matrix<N, R2, C2, S2>
) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>> where
    C2: Dim,
    R2: Dim,
    S2: Storage<N, R2, C2>,
    DefaultAllocator: Allocator<N, R2, C2>,
    ShapeConstraint: SameNumberOfRows<D, R2>, 
[src]

Solve a lower-triangular system with a dense right-hand-side.

pub fn tr_solve_lower_triangular<R2, C2, S2>(
    &self,
    b: &Matrix<N, R2, C2, S2>
) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>> where
    C2: Dim,
    R2: Dim,
    S2: Storage<N, R2, C2>,
    DefaultAllocator: Allocator<N, R2, C2>,
    ShapeConstraint: SameNumberOfRows<D, R2>, 
[src]

Solve a lower-triangular system with self transposed and a dense right-hand-side.

pub fn solve_lower_triangular_mut<R2, C2, S2>(
    &self,
    b: &mut Matrix<N, R2, C2, S2>
) -> bool where
    C2: Dim,
    R2: Dim,
    S2: StorageMut<N, R2, C2>,
    ShapeConstraint: SameNumberOfRows<D, R2>, 
[src]

Solve in-place a lower-triangular system with a dense right-hand-side.

pub fn tr_solve_lower_triangular_mut<R2, C2, S2>(
    &self,
    b: &mut Matrix<N, R2, C2, S2>
) -> bool where
    C2: Dim,
    R2: Dim,
    S2: StorageMut<N, R2, C2>,
    ShapeConstraint: SameNumberOfRows<D, R2>, 
[src]

Solve a lower-triangular system with self transposed and a dense right-hand-side.

pub fn solve_lower_triangular_cs<D2, S2>(
    &self,
    b: &CsMatrix<N, D2, U1, S2>
) -> Option<CsMatrix<N, D2, U1, CsVecStorage<N, D2, U1>>> where
    D2: Dim,
    S2: CsStorage<N, D2, U1>,
    DefaultAllocator: Allocator<bool, D, U1>,
    DefaultAllocator: Allocator<N, D2, U1>,
    DefaultAllocator: Allocator<usize, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D, D2>, 
[src]

Solve a lower-triangular system with a sparse right-hand-side.

Trait Implementations

impl<'a, 'b, N, R1, R2, C1, C2, S1, S2> Add<&'b CsMatrix<N, R2, C2, S2>> for &'a CsMatrix<N, R1, C1, S1> where
    C1: Dim,
    C2: Dim,
    N: Scalar + ClosedAdd<N> + ClosedMul<N> + One,
    R1: Dim,
    R2: Dim,
    S1: CsStorage<N, R1, C1>,
    S2: CsStorage<N, R2, C2>,
    ShapeConstraint: DimEq<R1, R2>,
    ShapeConstraint: DimEq<C1, C2>,
    DefaultAllocator: Allocator<usize, C2, U1>,
    DefaultAllocator: Allocator<usize, R1, U1>,
    DefaultAllocator: Allocator<N, R1, U1>, 
[src]

type Output = CsMatrix<N, R1, C2, CsVecStorage<N, R1, C2>>

The resulting type after applying the + operator.

impl<N, R, C, S> Clone for CsMatrix<N, R, C, S> where
    C: Dim + Clone,
    N: Scalar + Clone,
    R: Dim + Clone,
    S: CsStorage<N, R, C> + Clone
[src]

impl<N, R, C, S> Debug for CsMatrix<N, R, C, S> where
    C: Dim + Debug,
    N: Scalar + Debug,
    R: Dim + Debug,
    S: CsStorage<N, R, C> + Debug
[src]

impl<'a, N, R, C, S> From<CsMatrix<N, R, C, S>> for Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> where
    C: Dim,
    N: Scalar + Zero,
    R: Dim,
    S: CsStorage<N, R, C>,
    DefaultAllocator: Allocator<N, R, C>, 
[src]

impl<'a, N, R, C, S> From<Matrix<N, R, C, S>> for CsMatrix<N, R, C, CsVecStorage<N, R, C>> where
    C: Dim,
    N: Scalar + Zero,
    R: Dim,
    S: Storage<N, R, C>,
    DefaultAllocator: Allocator<N, R, C>,
    DefaultAllocator: Allocator<usize, C, U1>, 
[src]

impl<'a, 'b, N, R1, R2, C1, C2, S1, S2> Mul<&'b CsMatrix<N, R2, C2, S2>> for &'a CsMatrix<N, R1, C1, S1> where
    C1: Dim,
    C2: Dim,
    N: Scalar + ClosedAdd<N> + ClosedMul<N> + Zero,
    R1: Dim,
    R2: Dim,
    S1: CsStorage<N, R1, C1>,
    S2: CsStorage<N, R2, C2>,
    ShapeConstraint: AreMultipliable<R1, C1, R2, C2>,
    DefaultAllocator: Allocator<usize, C2, U1>,
    DefaultAllocator: Allocator<usize, R1, U1>,
    DefaultAllocator: Allocator<N, R1, U1>, 
[src]

type Output = CsMatrix<N, R1, C2, CsVecStorage<N, R1, C2>>

The resulting type after applying the * operator.

impl<'a, 'b, N, R, C, S> Mul<N> for CsMatrix<N, R, C, S> where
    C: Dim,
    N: Scalar + ClosedAdd<N> + ClosedMul<N> + Zero,
    R: Dim,
    S: CsStorageMut<N, R, C>, 
[src]

type Output = CsMatrix<N, R, C, S>

The resulting type after applying the * operator.

impl<N, R, C, S> PartialEq<CsMatrix<N, R, C, S>> for CsMatrix<N, R, C, S> where
    C: Dim + PartialEq<C>,
    N: Scalar + PartialEq<N>,
    R: Dim + PartialEq<R>,
    S: CsStorage<N, R, C> + PartialEq<S>, 
[src]

Auto Trait Implementations

impl<N, R, C, S> RefUnwindSafe for CsMatrix<N, R, C, S> where
    C: RefUnwindSafe,
    N: RefUnwindSafe,
    R: RefUnwindSafe,
    S: RefUnwindSafe

impl<N, R, C, S> Send for CsMatrix<N, R, C, S> where
    N: Send,
    S: Send

impl<N, R, C, S> Sync for CsMatrix<N, R, C, S> where
    N: Sync,
    S: Sync

impl<N, R, C, S> Unpin for CsMatrix<N, R, C, S> where
    C: Unpin,
    N: Unpin,
    R: Unpin,
    S: Unpin

impl<N, R, C, S> UnwindSafe for CsMatrix<N, R, C, S> where
    C: UnwindSafe,
    N: UnwindSafe,
    R: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UserData for T where
    T: Clone + Send + Sync + Any
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,