Struct rin::math::base::VecStorage[][src]

#[repr(C)]
pub struct VecStorage<N, R, C> where
    C: Dim,
    R: Dim
{ /* fields omitted */ }

A Vec-based matrix data storage. It may be dynamically-sized.

Implementations

impl<N, R, C> VecStorage<N, R, C> where
    C: Dim,
    R: Dim
[src]

pub fn new(nrows: R, ncols: C, data: Vec<N, Global>) -> VecStorage<N, R, C>[src]

Creates a new dynamic matrix data storage from the given vector and shape.

pub fn as_vec(&self) -> &Vec<N, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

The underlying data storage.

pub unsafe fn as_vec_mut(&mut self) -> &mut Vec<N, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

The underlying mutable data storage.

This is unsafe because this may cause UB if the size of the vector is changed by the user.

pub unsafe fn resize(self, sz: usize) -> Vec<N, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

Resizes the underlying mutable data storage and unwraps it.

If sz is larger than the current size, additional elements are uninitialized. If sz is smaller than the current size, additional elements are truncated.

pub fn len(&self) -> usize[src]

The number of elements on the underlying vector.

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

Returns true if the underlying vector contains no elements.

Trait Implementations

impl<N, R, C> Clone for VecStorage<N, R, C> where
    C: Clone + Dim,
    N: Clone,
    R: Clone + Dim
[src]

impl<N, R, C> Debug for VecStorage<N, R, C> where
    C: Debug + Dim,
    N: Debug,
    R: Debug + Dim
[src]

impl<'de, N, R, C> Deserialize<'de> for VecStorage<N, R, C> where
    C: Dim + Deserialize<'de>,
    N: Deserialize<'de>,
    R: Dim + Deserialize<'de>, 
[src]

impl<'a, N, R> Extend<&'a N> for VecStorage<N, R, Dynamic> where
    N: 'a + Copy,
    R: Dim
[src]

pub fn extend<I>(&mut self, iter: I) where
    I: IntoIterator<Item = &'a N>, 
[src]

Extends the number of columns of the VecStorage with elements from the given iterator.

Panics

This function panics if the number of elements yielded by the given iterator is not a multiple of the number of rows of the VecStorage.

impl<N, R, RV, SV> Extend<Matrix<N, RV, U1, SV>> for VecStorage<N, R, Dynamic> where
    N: Scalar,
    R: Dim,
    RV: Dim,
    SV: Storage<N, RV, U1>,
    ShapeConstraint: SameNumberOfRows<R, RV>, 
[src]

pub fn extend<I>(&mut self, iter: I) where
    I: IntoIterator<Item = Matrix<N, RV, U1, SV>>, 
[src]

Extends the number of columns of the VecStorage with vectors from the given iterator.

Panics

This function panics if the number of rows of each Vector yielded by the iterator is not equal to the number of rows of this VecStorage.

impl<N> Extend<N> for VecStorage<N, Dynamic, U1>[src]

pub fn extend<I>(&mut self, iter: I) where
    I: IntoIterator<Item = N>, 
[src]

Extends the number of rows of the VecStorage with elements from the given iterator.

impl<N, R> Extend<N> for VecStorage<N, R, Dynamic> where
    R: Dim
[src]

pub fn extend<I>(&mut self, iter: I) where
    I: IntoIterator<Item = N>, 
[src]

Extends the number of columns of the VecStorage with elements from the given iterator.

Panics

This function panics if the number of elements yielded by the given iterator is not a multiple of the number of rows of the VecStorage.

impl<N, R, C> Into<Vec<N, Global>> for VecStorage<N, R, C> where
    C: Dim,
    R: Dim
[src]

impl<N, R, C> PartialEq<VecStorage<N, R, C>> for VecStorage<N, R, C> where
    C: PartialEq<C> + Dim,
    N: PartialEq<N>,
    R: PartialEq<R> + Dim
[src]

impl<N, C1, C2> ReshapableStorage<N, Dynamic, C1, Dynamic, C2> for VecStorage<N, Dynamic, C1> where
    N: Scalar,
    C2: Dim,
    C1: Dim
[src]

type Output = VecStorage<N, Dynamic, C2>

The reshaped storage type.

impl<N, C1, R2> ReshapableStorage<N, Dynamic, C1, R2, Dynamic> for VecStorage<N, Dynamic, C1> where
    N: Scalar,
    C1: Dim,
    R2: DimName
[src]

type Output = VecStorage<N, R2, Dynamic>

The reshaped storage type.

impl<N, R1, C2> ReshapableStorage<N, R1, Dynamic, Dynamic, C2> for VecStorage<N, R1, Dynamic> where
    N: Scalar,
    C2: Dim,
    R1: DimName
[src]

type Output = VecStorage<N, Dynamic, C2>

The reshaped storage type.

impl<N, R1, R2> ReshapableStorage<N, R1, Dynamic, R2, Dynamic> for VecStorage<N, R1, Dynamic> where
    N: Scalar,
    R1: DimName,
    R2: DimName
[src]

type Output = VecStorage<N, R2, Dynamic>

The reshaped storage type.

impl<N, R, C> Serialize for VecStorage<N, R, C> where
    C: Dim + Serialize,
    N: Serialize,
    R: Dim + Serialize
[src]

impl<N, C> Storage<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]

type RStride = U1

The static stride of this storage’s rows.

type CStride = Dynamic

The static stride of this storage’s columns.

impl<N, R> Storage<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]

type RStride = U1

The static stride of this storage’s rows.

type CStride = R

The static stride of this storage’s columns.

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]

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]

impl<N, C> ContiguousStorage<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]

impl<N, R> ContiguousStorage<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]

impl<N, C> ContiguousStorageMut<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]

impl<N, R> ContiguousStorageMut<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]

impl<N, R, C> Eq for VecStorage<N, R, C> where
    C: Eq + Dim,
    N: Eq,
    R: Eq + Dim
[src]

impl<N, R, C> StructuralEq for VecStorage<N, R, C> where
    C: Dim,
    R: Dim
[src]

impl<N, R, C> StructuralPartialEq for VecStorage<N, R, C> where
    C: Dim,
    R: Dim
[src]

Auto Trait Implementations

impl<N, R, C> RefUnwindSafe for VecStorage<N, R, C> where
    C: RefUnwindSafe,
    N: RefUnwindSafe,
    R: RefUnwindSafe

impl<N, R, C> Send for VecStorage<N, R, C> where
    N: Send

impl<N, R, C> Sync for VecStorage<N, R, C> where
    N: Sync

impl<N, R, C> Unpin for VecStorage<N, R, C> where
    C: Unpin,
    N: Unpin,
    R: Unpin

impl<N, R, C> UnwindSafe for VecStorage<N, R, C> where
    C: UnwindSafe,
    N: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]