Struct nalgebra::core::SliceStorage
[−]
[src]
pub struct SliceStorage<'a, N: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> { /* fields omitted */ }
A matrix data storage for a matrix slice. Only contains an internal reference to another matrix data storage.
Methods
impl<'a, N: Scalar, R: Dim, C: Dim> SliceStorage<'a, N, R, C, Dynamic, Dynamic>
[src]
pub unsafe fn new_unchecked<RStor, CStor, S>(
storage: &'a S,
start: (usize, usize),
shape: (R, C)
) -> SliceStorage<'a, N, R, C, S::RStride, S::CStride> where
RStor: Dim,
CStor: Dim,
S: Storage<N, RStor, CStor>,
[src]
storage: &'a S,
start: (usize, usize),
shape: (R, C)
) -> SliceStorage<'a, N, R, C, S::RStride, S::CStride> where
RStor: Dim,
CStor: Dim,
S: Storage<N, RStor, CStor>,
Create a new matrix slice without bound checking.
pub unsafe fn new_with_strides_unchecked<S, RStor, CStor, RStride, CStride>(
storage: &'a S,
start: (usize, usize),
shape: (R, C),
strides: (RStride, CStride)
) -> SliceStorage<'a, N, R, C, RStride, CStride> where
RStor: Dim,
CStor: Dim,
S: Storage<N, RStor, CStor>,
RStride: Dim,
CStride: Dim,
[src]
storage: &'a S,
start: (usize, usize),
shape: (R, C),
strides: (RStride, CStride)
) -> SliceStorage<'a, N, R, C, RStride, CStride> where
RStor: Dim,
CStor: Dim,
S: Storage<N, RStor, CStor>,
RStride: Dim,
CStride: Dim,
Create a new matrix slice without bound checking.
pub unsafe fn from_raw_parts<RStride, CStride>(
ptr: *const N,
shape: (R, C),
strides: (RStride, CStride)
) -> SliceStorage<'a, N, R, C, RStride, CStride> where
RStride: Dim,
CStride: Dim,
[src]
ptr: *const N,
shape: (R, C),
strides: (RStride, CStride)
) -> SliceStorage<'a, N, R, C, RStride, CStride> where
RStride: Dim,
CStride: Dim,
Create a new matrix slice without bound checking and from a raw pointer.
Trait Implementations
impl<'a, N: Debug + Scalar, R: Debug + Dim, C: Debug + Dim, RStride: Debug + Dim, CStride: Debug + Dim> Debug for SliceStorage<'a, N, R, C, RStride, CStride>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a, N: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Copy for SliceStorage<'a, N, R, C, RStride, CStride>
[src]
impl<'a, N: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Clone for SliceStorage<'a, N, R, C, RStride, CStride>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, N: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Storage<N, R, C> for SliceStorage<'a, N, R, C, RStride, CStride>
[src]
type RStride = RStride
The static stride of this storage's rows.
type CStride = CStride
The static stride of this storage's columns.
fn ptr(&self) -> *const N
[src]
The matrix data pointer.
fn shape(&self) -> (R, C)
[src]
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)
[src]
The spacing between concecutive row elements and consecutive column elements. Read more
fn is_contiguous(&self) -> bool
[src]
Indicates whether this data buffer stores its elements contiguously.
fn into_owned(self) -> Owned<N, R, C> where
DefaultAllocator: Allocator<N, R, C>,
[src]
DefaultAllocator: Allocator<N, R, C>,
Builds a matrix data storage that does not contain any reference.
fn clone_owned(&self) -> Owned<N, R, C> where
DefaultAllocator: Allocator<N, R, C>,
[src]
DefaultAllocator: Allocator<N, R, C>,
Clones this data storage to one that does not contain any reference.
fn as_slice(&self) -> &[N]
[src]
Retrieves the data buffer as a contiguous slice. Read more
fn linear_index(&self, irow: usize, icol: usize) -> usize
[src]
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
[src]
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
[src]
Gets the address of the i-th matrix component without performing bound-checking.
ⓘImportant traits for &'a mut Iunsafe fn get_unchecked_linear(&self, i: usize) -> &N
[src]
Retrieves a reference to the i-th element without bound-checking.
ⓘImportant traits for &'a mut Iunsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &N
[src]
Retrieves a reference to the i-th element without bound-checking.