Struct oxygengine_physics_2d::prelude::nalgebra::CsVecStorage
source · pub struct CsVecStorage<T, R, C>where
T: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,{ /* private fields */ }
Expand description
A storage of column-compressed sparse matrix based on a Vec.
Implementations§
source§impl<T, R, C> CsVecStorage<T, R, C>where
T: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<T, R, C> CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
Trait Implementations§
source§impl<T, R, C> Clone for CsVecStorage<T, R, C>where
T: Clone + Scalar,
R: Clone + Dim,
C: Clone + Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<T, R, C> Clone for CsVecStorage<T, R, C>where T: Clone + Scalar, R: Clone + Dim, C: Clone + Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
source§fn clone(&self) -> CsVecStorage<T, R, C>
fn clone(&self) -> CsVecStorage<T, R, C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T, R, C> CsStorage<T, R, C> for CsVecStorage<T, R, C>where
T: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<T, R, C> CsStorage<T, R, C> for CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
source§fn len(&self) -> usize
fn len(&self) -> usize
The size of the value buffer (i.e. the entries known as possibly being non-zero).
source§fn row_index(&self, i: usize) -> usize
fn row_index(&self, i: usize) -> usize
Retrieve the i-th row index of the underlying row index buffer.
source§unsafe fn row_index_unchecked(&self, i: usize) -> usize
unsafe fn row_index_unchecked(&self, i: usize) -> usize
Retrieve the i-th row index of the underlying row index buffer. Read more
source§unsafe fn get_value_unchecked(&self, i: usize) -> &T
unsafe fn get_value_unchecked(&self, i: usize) -> &T
The i-th value on the contiguous value buffer of this storage. Read more
source§impl<'a, T, R, C> CsStorageIter<'a, T, R, C> for CsVecStorage<T, R, C>where
T: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<'a, T, R, C> CsStorageIter<'a, T, R, C> for CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
§type ColumnEntries = ColumnEntries<'a, T>
type ColumnEntries = ColumnEntries<'a, T>
Iterator through all the rows of a specific columns. Read more
§type ColumnRowIndices = Cloned<Iter<'a, usize>>
type ColumnRowIndices = Cloned<Iter<'a, usize>>
Iterator through the row indices of a specific column.
source§fn column_entries(
&'a self,
j: usize
) -> <CsVecStorage<T, R, C> as CsStorageIter<'a, T, R, C>>::ColumnEntries
fn column_entries( &'a self, j: usize ) -> <CsVecStorage<T, R, C> as CsStorageIter<'a, T, R, C>>::ColumnEntries
Iterates through all the entries of the j-th column.
source§fn column_row_indices(
&'a self,
j: usize
) -> <CsVecStorage<T, R, C> as CsStorageIter<'a, T, R, C>>::ColumnRowIndices
fn column_row_indices( &'a self, j: usize ) -> <CsVecStorage<T, R, C> as CsStorageIter<'a, T, R, C>>::ColumnRowIndices
Iterates through all the row indices of the j-th column.
source§impl<'a, T, R, C> CsStorageIterMut<'a, T, R, C> for CsVecStorage<T, R, C>where
T: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<'a, T, R, C> CsStorageIterMut<'a, T, R, C> for CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
§type ColumnEntriesMut = Zip<Cloned<Iter<'a, usize>>, IterMut<'a, T>>
type ColumnEntriesMut = Zip<Cloned<Iter<'a, usize>>, IterMut<'a, T>>
Mutable iterator through all the rows of a specific columns. Read more
source§fn values_mut(
&'a mut self
) -> <CsVecStorage<T, R, C> as CsStorageIterMut<'a, T, R, C>>::ValuesMut
fn values_mut( &'a mut self ) -> <CsVecStorage<T, R, C> as CsStorageIterMut<'a, T, R, C>>::ValuesMut
A mutable iterator through the values buffer of the sparse matrix.
source§fn column_entries_mut(
&'a mut self,
j: usize
) -> <CsVecStorage<T, R, C> as CsStorageIterMut<'a, T, R, C>>::ColumnEntriesMut
fn column_entries_mut( &'a mut self, j: usize ) -> <CsVecStorage<T, R, C> as CsStorageIterMut<'a, T, R, C>>::ColumnEntriesMut
Iterates mutably through all the entries of the j-th column.
source§impl<T, R, C> Debug for CsVecStorage<T, R, C>where
T: Debug + Scalar,
R: Debug + Dim,
C: Debug + Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<T, R, C> Debug for CsVecStorage<T, R, C>where T: Debug + Scalar, R: Debug + Dim, C: Debug + Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
source§impl<T, R, C> PartialEq<CsVecStorage<T, R, C>> for CsVecStorage<T, R, C>where
T: PartialEq<T> + Scalar,
R: PartialEq<R> + Dim,
C: PartialEq<C> + Dim,
DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<T, R, C> PartialEq<CsVecStorage<T, R, C>> for CsVecStorage<T, R, C>where T: PartialEq<T> + Scalar, R: PartialEq<R> + Dim, C: PartialEq<C> + Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
source§fn eq(&self, other: &CsVecStorage<T, R, C>) -> bool
fn eq(&self, other: &CsVecStorage<T, R, C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T, R, C> CsStorageMut<T, R, C> for CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
impl<T, R, C> StructuralPartialEq for CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,
Auto Trait Implementations§
impl<T, R, C> !RefUnwindSafe for CsVecStorage<T, R, C>
impl<T, R, C> !Send for CsVecStorage<T, R, C>
impl<T, R, C> !Sync for CsVecStorage<T, R, C>
impl<T, R, C> !Unpin for CsVecStorage<T, R, C>
impl<T, R, C> !UnwindSafe for CsVecStorage<T, R, C>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.