[][src]Struct rin::math::core::MatrixVec

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

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

Methods

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

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

Important traits for Vec<u8>

The underlying data storage.

Important traits for Vec<u8>

The underlying mutable data storage.

This is unsafe because this may cause UB if the vector is modified by the user.

Important traits for Vec<u8>

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.

Methods from Deref<Target = Vec<N>>

Returns the number of elements the vector can hold without reallocating.

Examples

let vec: Vec<i32> = Vec::with_capacity(10);
assert_eq!(vec.capacity(), 10);

Important traits for &'a mut [u8]

Extracts a slice containing the entire vector.

Equivalent to &s[..].

Examples

use std::io::{self, Write};
let buffer = vec![1, 2, 3, 5, 8];
io::sink().write(buffer.as_slice()).unwrap();

Returns the number of elements in the vector, also referred to as its 'length'.

Examples

let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);

Returns true if the vector contains no elements.

Examples

let mut v = Vec::new();
assert!(v.is_empty());

v.push(1);
assert!(!v.is_empty());

Trait Implementations

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

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

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

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

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

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

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

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

Retrieves a mutable reference to the element at (irow, icol) without bound-checking.

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

Swaps two elements without bound-checking.

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

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

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

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

Retrieves a mutable reference to the element at (irow, icol) without bound-checking.

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

Swaps two elements without bound-checking.

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

The static stride of this storage's rows.

The static stride of this storage's columns.

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

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

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

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

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

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

The static stride of this storage's rows.

The static stride of this storage's columns.

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

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

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

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

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

impl<N, R, C> Deref for MatrixVec<N, R, C> where
    C: Dim,
    R: Dim
[src]

The resulting type after dereferencing.

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

Performs copy-assignment from source. Read more

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

Extends the number of columns of the MatrixVec 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 MatrixVec.

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

Extends the number of columns of the MatrixVec 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 MatrixVec.

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

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

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

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

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

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

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

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

Auto Trait Implementations

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

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

Blanket Implementations

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

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

impl<T> From for T
[src]

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

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

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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

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

impl<T> SetParameter for T
[src]

Sets value as a parameter of self.

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

impl<V> IntoVec for V
[src]

impl<V> IntoPnt for V
[src]

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

impl<T> Same for T
[src]

Should always be Self