Struct nalgebra::base::SliceStorage[][src]

pub struct SliceStorage<'a, T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> { /* fields omitted */ }
Expand description

A matrix data storage for a matrix slice. Only contains an internal reference to another matrix data storage.

Implementations

impl<'a, T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> SliceStorage<'a, T, R, C, RStride, CStride>[src]

pub unsafe fn from_raw_parts(
    ptr: *const T,
    shape: (R, C),
    strides: (RStride, CStride)
) -> Self where
    RStride: Dim,
    CStride: Dim
[src]

Create a new matrix slice without bound checking and from a raw pointer.

impl<'a, T: Scalar, R: Dim, C: Dim> SliceStorage<'a, T, R, C, Dynamic, Dynamic>[src]

pub unsafe fn new_unchecked<RStor, CStor, S>(
    storage: &'a S,
    start: (usize, usize),
    shape: (R, C)
) -> SliceStorage<'a, T, R, C, S::RStride, S::CStride> where
    RStor: Dim,
    CStor: Dim,
    S: Storage<T, RStor, CStor>, 
[src]

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, T, R, C, RStride, CStride> where
    RStor: Dim,
    CStor: Dim,
    S: Storage<T, RStor, CStor>,
    RStride: Dim,
    CStride: Dim
[src]

Create a new matrix slice without bound checking.

Trait Implementations

impl<'a, T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Clone for SliceStorage<'a, T, 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, T: Debug + Scalar, R: Debug + Dim, C: Debug + Dim, RStride: Debug + Dim, CStride: Debug + Dim> Debug for SliceStorage<'a, T, R, C, RStride, CStride>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a, T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Storage<T, R, C> for SliceStorage<'a, T, 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 T[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 consecutive 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<T, R, C> where
    DefaultAllocator: Allocator<T, R, C>, 
[src]

Builds a matrix data storage that does not contain any reference.

fn clone_owned(&self) -> Owned<T, R, C> where
    DefaultAllocator: Allocator<T, R, C>, 
[src]

Clones this data storage to one that does not contain any reference.

fn as_slice(&self) -> &[T][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 T[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 T[src]

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

unsafe fn get_unchecked_linear(&self, i: usize) -> &T[src]

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

unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &T[src]

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

impl<'a, T: Scalar, R: DimName, C: Dim + IsNotStaticOne> ContiguousStorage<T, R, C> for SliceStorage<'a, T, R, C, U1, R>[src]

impl<'a, T: Scalar, R: Dim, CStride: Dim> ContiguousStorage<T, R, Const<1_usize>> for SliceStorage<'a, T, R, U1, U1, CStride>[src]

impl<'a, T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Copy for SliceStorage<'a, T, R, C, RStride, CStride>[src]

impl<'a, T: Scalar + Send, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Send for SliceStorage<'a, T, R, C, RStride, CStride>[src]

impl<'a, T: Scalar + Sync, R: Dim, C: Dim, RStride: Dim, CStride: Dim> Sync for SliceStorage<'a, T, R, C, RStride, CStride>[src]

Auto Trait Implementations

impl<'a, T, R, C, RStride, CStride> RefUnwindSafe for SliceStorage<'a, T, R, C, RStride, CStride> where
    C: RefUnwindSafe,
    CStride: RefUnwindSafe,
    R: RefUnwindSafe,
    RStride: RefUnwindSafe,
    T: RefUnwindSafe

impl<'a, T, R, C, RStride, CStride> Unpin for SliceStorage<'a, T, R, C, RStride, CStride> where
    C: Unpin,
    CStride: Unpin,
    R: Unpin,
    RStride: Unpin

impl<'a, T, R, C, RStride, CStride> UnwindSafe for SliceStorage<'a, T, R, C, RStride, CStride> where
    C: UnwindSafe,
    CStride: UnwindSafe,
    R: UnwindSafe,
    RStride: UnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

pub fn to_subset(&self) -> Option<SS>[src]

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

pub fn is_in_subset(&self) -> bool[src]

Checks if self is actually part of its subset T (and can be converted to it).

pub fn to_subset_unchecked(&self) -> SS[src]

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

pub fn from_subset(element: &SS) -> SP[src]

The inclusion map: converts self to the equivalent element of its superset.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V