[][src]Trait na::StorageMut

pub unsafe trait StorageMut<N, R, C = U1>: Storage<N, R, C> where
    C: Dim,
    N: Scalar,
    R: Dim
{ fn ptr_mut(&mut self) -> *mut N;
fn as_mut_slice(&mut self) -> &mut [N]; unsafe default fn get_address_unchecked_linear_mut(
        &mut self,
        i: usize
    ) -> *mut N { ... }
unsafe default fn get_address_unchecked_mut(
        &mut self,
        irow: usize,
        icol: usize
    ) -> *mut N { ... }
unsafe default fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N { ... }
unsafe default fn get_unchecked_mut(
        &mut self,
        irow: usize,
        icol: usize
    ) -> &mut N { ... }
unsafe default fn swap_unchecked_linear(&mut self, i1: usize, i2: usize) { ... }
unsafe default 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

fn ptr_mut(&mut self) -> *mut N

The matrix mutable data pointer.

Important traits for &'_ [u8]
fn as_mut_slice(&mut self) -> &mut [N]

Retrieves the mutable data buffer as a contiguous slice.

Matrix components may not be contiguous, depending on its strides.

Loading content...

Provided methods

unsafe default 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 default fn get_address_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> *mut N

Gets the mutable address of the i-th matrix component without performing bound-checking.

unsafe default fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N

Retrieves a mutable reference to the i-th element without bound-checking.

unsafe default 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 default fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)

Swaps two elements using their linear index without bound-checking.

unsafe default fn swap_unchecked(
    &mut self,
    row_col1: (usize, usize),
    row_col2: (usize, usize)
)

Swaps two elements without bound-checking.

Loading content...

Implementors

impl<'a, N, R, C, RStride, CStride> StorageMut<N, R, C> for SliceStorageMut<'a, N, R, C, RStride, CStride> where
    C: Dim,
    CStride: Dim,
    N: Scalar,
    R: Dim,
    RStride: Dim
[src]

unsafe default fn get_address_unchecked_linear_mut(
    &mut self,
    i: usize
) -> *mut N
[src]

unsafe default fn get_address_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> *mut N
[src]

unsafe default fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N[src]

unsafe default fn get_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> &mut N
[src]

unsafe default fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)[src]

unsafe default fn swap_unchecked(
    &mut self,
    row_col1: (usize, usize),
    row_col2: (usize, usize)
)
[src]

impl<N, C> StorageMut<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
    C: Dim,
    N: Scalar,
    DefaultAllocator: Allocator<N, Dynamic, C>,
    <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer == VecStorage<N, Dynamic, C>, 
[src]

unsafe default fn get_address_unchecked_linear_mut(
    &mut self,
    i: usize
) -> *mut N
[src]

unsafe default fn get_address_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> *mut N
[src]

unsafe default fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N[src]

unsafe default fn get_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> &mut N
[src]

unsafe default fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)[src]

unsafe default fn swap_unchecked(
    &mut self,
    row_col1: (usize, usize),
    row_col2: (usize, usize)
)
[src]

impl<N, R> StorageMut<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
    N: Scalar,
    R: DimName,
    DefaultAllocator: Allocator<N, R, Dynamic>,
    <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer == VecStorage<N, R, Dynamic>, 
[src]

unsafe default fn get_address_unchecked_linear_mut(
    &mut self,
    i: usize
) -> *mut N
[src]

unsafe default fn get_address_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> *mut N
[src]

unsafe default fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N[src]

unsafe default fn get_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> &mut N
[src]

unsafe default fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)[src]

unsafe default fn swap_unchecked(
    &mut self,
    row_col1: (usize, usize),
    row_col2: (usize, usize)
)
[src]

impl<N, R, C> StorageMut<N, R, C> for ArrayStorage<N, R, C> where
    C: DimName,
    N: Scalar,
    R: DimName,
    <R as DimName>::Value: Mul<<C as DimName>::Value>,
    <<R as DimName>::Value as Mul<<C as DimName>::Value>>::Output: ArrayLength<N>,
    DefaultAllocator: Allocator<N, R, C>,
    <DefaultAllocator as Allocator<N, R, C>>::Buffer == ArrayStorage<N, R, C>, 
[src]

unsafe default fn get_address_unchecked_linear_mut(
    &mut self,
    i: usize
) -> *mut N
[src]

unsafe default fn get_address_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> *mut N
[src]

unsafe default fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N[src]

unsafe default fn get_unchecked_mut(
    &mut self,
    irow: usize,
    icol: usize
) -> &mut N
[src]

unsafe default fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)[src]

unsafe default fn swap_unchecked(
    &mut self,
    row_col1: (usize, usize),
    row_col2: (usize, usize)
)
[src]

Loading content...