Struct nalgebra::base::VecStorage [−][src]
Expand description
A Vec-based matrix data storage. It may be dynamically-sized.
Implementations
Creates a new dynamic matrix data storage from the given vector and shape.
The underlying mutable data storage.
This is unsafe because this may cause UB if the size of the vector is changed by the user.
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.
Trait Implementations
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
.
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
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>,
ShapeConstraint: SameNumberOfRows<R, RV>,
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>,
ShapeConstraint: SameNumberOfRows<R, RV>,
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
.
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
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
.
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Extends the number of rows of the VecStorage
with elements
from the given iterator.
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl<N: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq<VecStorage<N, R, C>> for VecStorage<N, R, C>
impl<N: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq<VecStorage<N, R, C>> for VecStorage<N, R, C>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<N, C1, C2> ReshapableStorage<N, Dynamic, C1, Dynamic, C2> for VecStorage<N, Dynamic, C1> where
N: Scalar,
C1: Dim,
C2: Dim,
impl<N, C1, C2> ReshapableStorage<N, Dynamic, C1, Dynamic, C2> for VecStorage<N, Dynamic, C1> where
N: Scalar,
C1: Dim,
C2: Dim,
type Output = VecStorage<N, Dynamic, C2>
type Output = VecStorage<N, Dynamic, C2>
The reshaped storage type.
Reshapes the storage into the output storage type.
impl<N, C1, R2> ReshapableStorage<N, Dynamic, C1, R2, Dynamic> for VecStorage<N, Dynamic, C1> where
N: Scalar,
C1: Dim,
R2: DimName,
impl<N, C1, R2> ReshapableStorage<N, Dynamic, C1, R2, Dynamic> for VecStorage<N, Dynamic, C1> where
N: Scalar,
C1: Dim,
R2: DimName,
type Output = VecStorage<N, R2, Dynamic>
type Output = VecStorage<N, R2, Dynamic>
The reshaped storage type.
Reshapes the storage into the output storage type.
impl<N, R1, C2> ReshapableStorage<N, R1, Dynamic, Dynamic, C2> for VecStorage<N, R1, Dynamic> where
N: Scalar,
R1: DimName,
C2: Dim,
impl<N, R1, C2> ReshapableStorage<N, R1, Dynamic, Dynamic, C2> for VecStorage<N, R1, Dynamic> where
N: Scalar,
R1: DimName,
C2: Dim,
type Output = VecStorage<N, Dynamic, C2>
type Output = VecStorage<N, Dynamic, C2>
The reshaped storage type.
Reshapes the storage into the output storage type.
impl<N, R1, R2> ReshapableStorage<N, R1, Dynamic, R2, Dynamic> for VecStorage<N, R1, Dynamic> where
N: Scalar,
R1: DimName,
R2: DimName,
impl<N, R1, R2> ReshapableStorage<N, R1, Dynamic, R2, Dynamic> for VecStorage<N, R1, Dynamic> where
N: Scalar,
R1: DimName,
R2: DimName,
type Output = VecStorage<N, R2, Dynamic>
type Output = VecStorage<N, R2, Dynamic>
The reshaped storage type.
Reshapes the storage into the output storage type.
impl<N: Scalar, C: Dim> Storage<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>,
impl<N: Scalar, C: Dim> Storage<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>,
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
The spacing between consecutive row elements and consecutive column elements. Read more
Indicates whether this data buffer stores its elements contiguously.
Builds a matrix data storage that does not contain any reference.
fn clone_owned(&self) -> Owned<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C>,
fn clone_owned(&self) -> Owned<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C>,
Clones this data storage to one that does not contain any reference.
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: Scalar, R: DimName> Storage<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>,
impl<N: Scalar, R: DimName> Storage<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>,
type CStride = R
type CStride = R
The static stride of this storage’s columns.
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
The spacing between consecutive row elements and consecutive column elements. Read more
Indicates whether this data buffer stores its elements contiguously.
Builds a matrix data storage that does not contain any reference.
fn clone_owned(&self) -> Owned<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic>,
fn clone_owned(&self) -> Owned<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic>,
Clones this data storage to one that does not contain any reference.
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: Scalar, C: Dim> StorageMut<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>,
impl<N: Scalar, C: Dim> StorageMut<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>,
Retrieves the mutable data buffer as a contiguous slice. Read more
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.
impl<N: Scalar, R: DimName> StorageMut<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>,
impl<N: Scalar, R: DimName> StorageMut<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>,
Retrieves the mutable data buffer as a contiguous slice. Read more
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.
impl<N: Scalar, C: Dim> ContiguousStorage<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>,
impl<N: Scalar, R: DimName> ContiguousStorage<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>,
impl<N: Scalar, C: Dim> ContiguousStorageMut<N, Dynamic, C> for VecStorage<N, Dynamic, C> where
DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>,
impl<N: Scalar, R: DimName> ContiguousStorageMut<N, R, Dynamic> for VecStorage<N, R, Dynamic> where
DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>,
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
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.