Struct nalgebra::core::SliceStorageMut
[−]
[src]
pub struct SliceStorageMut<'a, N: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim, Alloc> { /* fields omitted */ }
A mutable matrix data storage for mutable matrix slice. Only contains an internal mutable reference to another matrix data storage.
Methods
impl<'a, N: Scalar, R: Dim, C: Dim> SliceStorageMut<'a, N, R, C, Dynamic, Dynamic, ()>
[src]
unsafe fn new_unchecked<RStor, CStor, S>(
storage: &'a mut S,
start: (usize, usize),
shape: (R, C)
) -> SliceStorageMut<'a, N, R, C, S::RStride, S::CStride, S::Alloc> where
RStor: Dim,
CStor: Dim,
S: StorageMut<N, RStor, CStor>,
storage: &'a mut S,
start: (usize, usize),
shape: (R, C)
) -> SliceStorageMut<'a, N, R, C, S::RStride, S::CStride, S::Alloc> where
RStor: Dim,
CStor: Dim,
S: StorageMut<N, RStor, CStor>,
Create a new matrix slice without bound checking.
unsafe fn new_with_strides_unchecked<S, RStor, CStor, RStride, CStride>(
storage: &'a mut S,
start: (usize, usize),
shape: (R, C),
strides: (RStride, CStride)
) -> SliceStorageMut<'a, N, R, C, RStride, CStride, S::Alloc> where
RStor: Dim,
CStor: Dim,
S: StorageMut<N, RStor, CStor>,
RStride: Dim,
CStride: Dim,
storage: &'a mut S,
start: (usize, usize),
shape: (R, C),
strides: (RStride, CStride)
) -> SliceStorageMut<'a, N, R, C, RStride, CStride, S::Alloc> where
RStor: Dim,
CStor: Dim,
S: StorageMut<N, RStor, CStor>,
RStride: Dim,
CStride: Dim,
Create a new matrix slice without bound checking.
Trait Implementations
impl<'a, N, R: Dim, C: Dim, RStride: Dim, CStride: Dim, Alloc> Storage<N, R, C> for SliceStorageMut<'a, N, R, C, RStride, CStride, Alloc> where
N: Scalar,
Alloc: Allocator<N, R, C>,
[src]
N: Scalar,
Alloc: Allocator<N, R, C>,
type RStride = RStride
The static stride of this storage's rows.
type CStride = CStride
The static stride of this storage's columns.
type Alloc = Alloc
The allocator for this family of storage.
fn into_owned(self) -> Owned<N, R, C, Self::Alloc>
Builds a matrix data storage that does not contain any reference.
fn clone_owned(&self) -> Owned<N, R, C, Self::Alloc>
Clones this data storage into one that does not contain any reference.
fn ptr(&self) -> *const N
The matrix data pointer.
fn shape(&self) -> (R, C)
The dimension of the matrix at run-time. Arr length of zero indicates the additive identity element of any dimension. Must be equal to Self::dimension()
if it is not None
. Read more
fn strides(&self) -> (Self::RStride, Self::CStride)
The spacing between concecutive row elements and consecutive column elements. Read more
fn linear_index(&self, irow: usize, icol: usize) -> usize
Compute the index corresponding to the irow-th row and icol-th column of this matrix. The index must be such that the following holds: Read more
unsafe fn get_address_unchecked_linear(&self, i: usize) -> *const N
Gets the address of the i-th matrix component without performing bound-checking.
unsafe fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const N
Gets the address of the i-th matrix component without performing bound-checking.
unsafe fn get_unchecked_linear(&self, i: usize) -> &N
Retrieves a reference to the i-th element without bound-checking.
unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &N
Retrieves a reference to the i-th element without bound-checking.
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>,
[src]
N: Scalar,
Alloc: Allocator<N, R, C>,
fn ptr_mut(&mut self) -> *mut N
The matrix mutable data pointer.
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.