Trait nalgebra::core::storage::StorageMut
[−]
[src]
pub unsafe trait StorageMut<N: Scalar, R: Dim, C: Dim>: Storage<N, R, C> { fn ptr_mut(&mut self) -> *mut N; unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut N { ... } unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut N { ... } unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N { ... } unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut N { ... } unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize) { ... } unsafe fn swap_unchecked(
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
) { ... } }
Trait implemented by matrix data storage that can provide a mutable access to its elements.
Note that a mutable access does not mean that the matrix owns its data. For example, a mutable matrix slice can provide mutable access to its elements even if it does not own its data (it contains only an internal reference to them).
Required Methods
Provided Methods
unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut N
Gets the mutable address of the i-th matrix component without performing bound-checking.
unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut N
&mut self,
irow: usize,
icol: usize
) -> *mut N
Gets the mutable address of the i-th matrix component without performing bound-checking.
unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N
Retrieves a mutable reference to the i-th element without bound-checking.
unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut N
Retrieves a mutable reference to the element at (irow, icol)
without bound-checking.
unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
Swaps two elements using their linear index without bound-checking.
unsafe fn swap_unchecked(
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
)
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
)
Swaps two elements without bound-checking.
Implementors
impl<'a, N, R: Dim, C: Dim, RStride: Dim, CStride: Dim, Alloc> StorageMut<N, R, C> for SliceStorageMut<'a, N, R, C, RStride, CStride, Alloc> where
N: Scalar,
Alloc: Allocator<N, R, C>,impl<N, R, C> StorageMut<N, R, C> for MatrixArray<N, R, C> where
N: Scalar,
R: DimName,
C: DimName,
R::Value: Mul<C::Value>,
Prod<R::Value, C::Value>: ArrayLength<N>,impl<N: Scalar, C: Dim> StorageMut<N, Dynamic, C> for MatrixVec<N, Dynamic, C>
impl<N: Scalar, R: DimName> StorageMut<N, R, Dynamic> for MatrixVec<N, R, Dynamic>