[−][src]Struct oxygengine_physics_2d::prelude::nalgebra::sparse::CsMatrix
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]
C: Dim,
N: Scalar,
R: Dim,
DefaultAllocator: Allocator<usize, C, U1>,
pub fn new_uninitialized_generic(
nrows: R,
ncols: C,
nvals: usize
) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
[src]
nrows: R,
ncols: C,
nvals: usize
) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
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]
C: Dim,
N: Scalar,
R: Dim,
S: CsStorage<N, R, C>,
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 nis
self.len(). All operations of CSC matrices on nalgebra assume, and will return, sorted indices. If at any time this
is_sortedmethod returns
false`, 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]
DefaultAllocator: Allocator<usize, R, U1>,
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]
C: Dim,
N: Scalar,
R: Dim,
S: CsStorageMut<N, R, C>,
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]
N: Scalar + Zero + ClosedAdd<N>,
pub fn from_triplet(
nrows: usize,
ncols: usize,
irows: &[usize],
icols: &[usize],
vals: &[N]
) -> CsMatrix<N, Dynamic, Dynamic, CsVecStorage<N, Dynamic, Dynamic>>
[src]
nrows: usize,
ncols: usize,
irows: &[usize],
icols: &[usize],
vals: &[N]
) -> CsMatrix<N, Dynamic, Dynamic, CsVecStorage<N, Dynamic, Dynamic>>
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]
C: Dim,
N: Scalar + Zero + ClosedAdd<N>,
R: Dim,
DefaultAllocator: Allocator<usize, C, U1>,
DefaultAllocator: Allocator<N, R, U1>,
pub fn from_triplet_generic(
nrows: R,
ncols: C,
irows: &[usize],
icols: &[usize],
vals: &[N]
) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
[src]
nrows: R,
ncols: C,
irows: &[usize],
icols: &[usize],
vals: &[N]
) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
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]
D: Dim,
N: RealField,
S: CsStorage<N, D, D>,
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]
&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>,
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]
&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>,
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]
&self,
b: &mut Matrix<N, R2, C2, S2>
) -> bool where
C2: Dim,
R2: Dim,
S2: StorageMut<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<D, R2>,
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]
&self,
b: &mut Matrix<N, R2, C2, S2>
) -> bool where
C2: Dim,
R2: Dim,
S2: StorageMut<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<D, R2>,
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]
&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>,
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]
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>,
type Output = CsMatrix<N, R1, C2, CsVecStorage<N, R1, C2>>
The resulting type after applying the +
operator.
fn add(
self,
rhs: &'b CsMatrix<N, R2, C2, S2>
) -> <&'a CsMatrix<N, R1, C1, S1> as Add<&'b CsMatrix<N, R2, C2, S2>>>::Output
[src]
self,
rhs: &'b CsMatrix<N, R2, C2, S2>
) -> <&'a CsMatrix<N, R1, C1, S1> as Add<&'b CsMatrix<N, R2, C2, S2>>>::Output
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]
C: Dim + Clone,
N: Scalar + Clone,
R: Dim + Clone,
S: CsStorage<N, R, C> + Clone,
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]
C: Dim + Debug,
N: Scalar + Debug,
R: Dim + Debug,
S: CsStorage<N, R, C> + Debug,
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]
C: Dim,
N: Scalar + Zero,
R: Dim,
S: CsStorage<N, R, C>,
DefaultAllocator: Allocator<N, R, C>,
fn from(
m: CsMatrix<N, R, C, S>
) -> Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
[src]
m: CsMatrix<N, R, C, S>
) -> Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
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]
C: Dim,
N: Scalar + Zero,
R: Dim,
S: Storage<N, R, C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<usize, C, U1>,
fn from(m: Matrix<N, R, C, S>) -> CsMatrix<N, R, C, CsVecStorage<N, R, C>>
[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]
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>,
type Output = CsMatrix<N, R1, C2, CsVecStorage<N, R1, C2>>
The resulting type after applying the *
operator.
fn mul(
self,
rhs: &'b CsMatrix<N, R2, C2, S2>
) -> <&'a CsMatrix<N, R1, C1, S1> as Mul<&'b CsMatrix<N, R2, C2, S2>>>::Output
[src]
self,
rhs: &'b CsMatrix<N, R2, C2, S2>
) -> <&'a CsMatrix<N, R1, C1, S1> as Mul<&'b CsMatrix<N, R2, C2, S2>>>::Output
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]
C: Dim,
N: Scalar + ClosedAdd<N> + ClosedMul<N> + Zero,
R: Dim,
S: CsStorageMut<N, R, C>,
type Output = CsMatrix<N, R, C, S>
The resulting type after applying the *
operator.
fn mul(self, rhs: N) -> <CsMatrix<N, R, C, S> as Mul<N>>::Output
[src]
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]
C: Dim + PartialEq<C>,
N: Scalar + PartialEq<N>,
R: Dim + PartialEq<R>,
S: CsStorage<N, R, C> + PartialEq<S>,
Auto Trait Implementations
impl<N, R, C, S> RefUnwindSafe for CsMatrix<N, R, C, S> where
C: RefUnwindSafe,
N: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
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,
N: Send,
S: Send,
impl<N, R, C, S> Sync for CsMatrix<N, R, C, S> where
N: Sync,
S: Sync,
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,
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,
C: UnwindSafe,
N: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
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>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UserData for T where
T: Clone + Send + Sync + Any,
[src]
T: Clone + Send + Sync + Any,
fn clone_boxed(&self) -> Box<dyn UserData + 'static>
[src]
fn to_any(&self) -> Box<dyn Any + 'static + Sync + Send>
[src]
fn as_any(&self) -> &(dyn Any + 'static + Sync + Send)
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,