Struct heron::rapier_plugin::rapier::na::VecStorage [−][src]
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]
C: Dim,
R: Dim,
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>
[src]
The underlying data storage.
pub unsafe fn as_vec_mut(&mut self) -> &mut Vec<N, Global>
[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>
[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: Dim + Clone,
N: Clone,
R: Dim + Clone,
[src]
C: Dim + Clone,
N: Clone,
R: Dim + Clone,
pub fn clone(&self) -> VecStorage<N, R, C>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
C: Dim,
N: Scalar,
DefaultAllocator: Allocator<N, Dynamic, C>,
<DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer == VecStorage<N, Dynamic, C>,
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]
N: Scalar,
R: DimName,
DefaultAllocator: Allocator<N, R, Dynamic>,
<DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer == VecStorage<N, R, Dynamic>,
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]
C: Dim,
N: Scalar,
DefaultAllocator: Allocator<N, Dynamic, C>,
<DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer == VecStorage<N, Dynamic, C>,
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]
N: Scalar,
R: DimName,
DefaultAllocator: Allocator<N, R, Dynamic>,
<DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer == VecStorage<N, R, Dynamic>,
impl<N, R, C> Debug for VecStorage<N, R, C> where
C: Dim + Debug,
N: Debug,
R: Dim + Debug,
[src]
C: Dim + Debug,
N: Debug,
R: Dim + Debug,
impl<N, R, C> Eq for VecStorage<N, R, C> where
C: Dim + Eq,
N: Eq,
R: Dim + Eq,
[src]
C: Dim + Eq,
N: Eq,
R: Dim + Eq,
impl<'a, N, R> Extend<&'a N> for VecStorage<N, R, Dynamic> where
N: 'a + Copy,
R: Dim,
[src]
N: 'a + Copy,
R: Dim,
pub fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = &'a N>,
[src]
I: IntoIterator<Item = &'a N>,
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
.
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
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]
N: Scalar,
R: Dim,
RV: Dim,
SV: Storage<N, RV, U1>,
ShapeConstraint: SameNumberOfRows<R, RV>,
pub fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = Matrix<N, RV, U1, SV>>,
[src]
I: IntoIterator<Item = Matrix<N, RV, U1, SV>>,
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
.
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<N, R> Extend<N> for VecStorage<N, R, Dynamic> where
R: Dim,
[src]
R: Dim,
pub fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = N>,
[src]
I: IntoIterator<Item = N>,
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
.
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<N> Extend<N> for VecStorage<N, Dynamic, U1>
[src]
pub fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = N>,
[src]
I: IntoIterator<Item = N>,
Extends the number of rows of the VecStorage
with elements
from the given iterator.
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<N, R, C> Into<Vec<N, Global>> for VecStorage<N, R, C> where
C: Dim,
R: Dim,
[src]
C: Dim,
R: Dim,
impl<N, R, C> PartialEq<VecStorage<N, R, C>> for VecStorage<N, R, C> where
C: Dim + PartialEq<C>,
N: PartialEq<N>,
R: Dim + PartialEq<R>,
[src]
C: Dim + PartialEq<C>,
N: PartialEq<N>,
R: Dim + PartialEq<R>,
pub fn eq(&self, other: &VecStorage<N, R, C>) -> bool
[src]
pub fn ne(&self, other: &VecStorage<N, R, C>) -> bool
[src]
impl<N, C1, C2> ReshapableStorage<N, Dynamic, C1, Dynamic, C2> for VecStorage<N, Dynamic, C1> where
N: Scalar,
C1: Dim,
C2: Dim,
[src]
N: Scalar,
C1: Dim,
C2: Dim,
type Output = VecStorage<N, Dynamic, C2>
The reshaped storage type.
pub fn reshape_generic(
self,
nrows: Dynamic,
ncols: C2
) -> <VecStorage<N, Dynamic, C1> as ReshapableStorage<N, Dynamic, C1, Dynamic, C2>>::Output
[src]
self,
nrows: Dynamic,
ncols: C2
) -> <VecStorage<N, Dynamic, C1> as ReshapableStorage<N, Dynamic, C1, Dynamic, C2>>::Output
impl<N, C1, R2> ReshapableStorage<N, Dynamic, C1, R2, Dynamic> for VecStorage<N, Dynamic, C1> where
N: Scalar,
R2: DimName,
C1: Dim,
[src]
N: Scalar,
R2: DimName,
C1: Dim,
type Output = VecStorage<N, R2, Dynamic>
The reshaped storage type.
pub fn reshape_generic(
self,
nrows: R2,
ncols: Dynamic
) -> <VecStorage<N, Dynamic, C1> as ReshapableStorage<N, Dynamic, C1, R2, Dynamic>>::Output
[src]
self,
nrows: R2,
ncols: Dynamic
) -> <VecStorage<N, Dynamic, C1> as ReshapableStorage<N, Dynamic, C1, R2, Dynamic>>::Output
impl<N, R1, C2> ReshapableStorage<N, R1, Dynamic, Dynamic, C2> for VecStorage<N, R1, Dynamic> where
N: Scalar,
R1: DimName,
C2: Dim,
[src]
N: Scalar,
R1: DimName,
C2: Dim,
type Output = VecStorage<N, Dynamic, C2>
The reshaped storage type.
pub fn reshape_generic(
self,
nrows: Dynamic,
ncols: C2
) -> <VecStorage<N, R1, Dynamic> as ReshapableStorage<N, R1, Dynamic, Dynamic, C2>>::Output
[src]
self,
nrows: Dynamic,
ncols: C2
) -> <VecStorage<N, R1, Dynamic> as ReshapableStorage<N, R1, Dynamic, Dynamic, C2>>::Output
impl<N, R1, R2> ReshapableStorage<N, R1, Dynamic, R2, Dynamic> for VecStorage<N, R1, Dynamic> where
N: Scalar,
R1: DimName,
R2: DimName,
[src]
N: Scalar,
R1: DimName,
R2: DimName,
type Output = VecStorage<N, R2, Dynamic>
The reshaped storage type.
pub fn reshape_generic(
self,
nrows: R2,
ncols: Dynamic
) -> <VecStorage<N, R1, Dynamic> as ReshapableStorage<N, R1, Dynamic, R2, Dynamic>>::Output
[src]
self,
nrows: R2,
ncols: Dynamic
) -> <VecStorage<N, R1, Dynamic> as ReshapableStorage<N, R1, Dynamic, R2, Dynamic>>::Output
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]
C: Dim,
N: Scalar,
DefaultAllocator: Allocator<N, Dynamic, C>,
<DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer == VecStorage<N, Dynamic, C>,
type RStride = U1
The static stride of this storage's rows.
type CStride = Dynamic
The static stride of this storage's columns.
pub fn ptr(&self) -> *const N
[src]
pub fn shape(&self) -> (Dynamic, C)
[src]
pub fn strides(
&self
) -> (<VecStorage<N, Dynamic, C> as Storage<N, Dynamic, C>>::RStride, <VecStorage<N, Dynamic, C> as Storage<N, Dynamic, C>>::CStride)
[src]
&self
) -> (<VecStorage<N, Dynamic, C> as Storage<N, Dynamic, C>>::RStride, <VecStorage<N, Dynamic, C> as Storage<N, Dynamic, C>>::CStride)
pub fn is_contiguous(&self) -> bool
[src]
pub fn into_owned(
self
) -> <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer where
DefaultAllocator: Allocator<N, Dynamic, C>,
[src]
self
) -> <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer where
DefaultAllocator: Allocator<N, Dynamic, C>,
pub fn clone_owned(
&self
) -> <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer where
DefaultAllocator: Allocator<N, Dynamic, C>,
[src]
&self
) -> <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer where
DefaultAllocator: Allocator<N, Dynamic, C>,
pub fn as_slice(&self) -> &[N]ⓘ
[src]
pub fn linear_index(&self, irow: usize, icol: usize) -> usize
[src]
pub unsafe fn get_address_unchecked_linear(&self, i: usize) -> *const N
[src]
pub unsafe fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const N
[src]
pub unsafe fn get_unchecked_linear(&self, i: usize) -> &N
[src]
pub unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &N
[src]
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]
N: Scalar,
R: DimName,
DefaultAllocator: Allocator<N, R, Dynamic>,
<DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer == VecStorage<N, R, Dynamic>,
type RStride = U1
The static stride of this storage's rows.
type CStride = R
The static stride of this storage's columns.
pub fn ptr(&self) -> *const N
[src]
pub fn shape(&self) -> (R, Dynamic)
[src]
pub fn strides(
&self
) -> (<VecStorage<N, R, Dynamic> as Storage<N, R, Dynamic>>::RStride, <VecStorage<N, R, Dynamic> as Storage<N, R, Dynamic>>::CStride)
[src]
&self
) -> (<VecStorage<N, R, Dynamic> as Storage<N, R, Dynamic>>::RStride, <VecStorage<N, R, Dynamic> as Storage<N, R, Dynamic>>::CStride)
pub fn is_contiguous(&self) -> bool
[src]
pub fn into_owned(
self
) -> <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer where
DefaultAllocator: Allocator<N, R, Dynamic>,
[src]
self
) -> <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer where
DefaultAllocator: Allocator<N, R, Dynamic>,
pub fn clone_owned(
&self
) -> <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer where
DefaultAllocator: Allocator<N, R, Dynamic>,
[src]
&self
) -> <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer where
DefaultAllocator: Allocator<N, R, Dynamic>,
pub fn as_slice(&self) -> &[N]ⓘ
[src]
pub fn linear_index(&self, irow: usize, icol: usize) -> usize
[src]
pub unsafe fn get_address_unchecked_linear(&self, i: usize) -> *const N
[src]
pub unsafe fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const N
[src]
pub unsafe fn get_unchecked_linear(&self, i: usize) -> &N
[src]
pub unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &N
[src]
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]
C: Dim,
N: Scalar,
DefaultAllocator: Allocator<N, Dynamic, C>,
<DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer == VecStorage<N, Dynamic, C>,
pub fn ptr_mut(&mut self) -> *mut N
[src]
pub fn as_mut_slice(&mut self) -> &mut [N]ⓘ
[src]
pub unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut N
[src]
pub unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut N
[src]
&mut self,
irow: usize,
icol: usize
) -> *mut N
pub unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N
[src]
pub unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut N
[src]
pub unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
[src]
pub unsafe fn swap_unchecked(
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
)
[src]
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
)
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]
N: Scalar,
R: DimName,
DefaultAllocator: Allocator<N, R, Dynamic>,
<DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer == VecStorage<N, R, Dynamic>,
pub fn ptr_mut(&mut self) -> *mut N
[src]
pub fn as_mut_slice(&mut self) -> &mut [N]ⓘ
[src]
pub unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut N
[src]
pub unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut N
[src]
&mut self,
irow: usize,
icol: usize
) -> *mut N
pub unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N
[src]
pub unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut N
[src]
pub unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
[src]
pub unsafe fn swap_unchecked(
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
)
[src]
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
)
impl<N, R, C> StructuralEq for VecStorage<N, R, C> where
C: Dim,
R: Dim,
[src]
C: Dim,
R: Dim,
impl<N, R, C> StructuralPartialEq for VecStorage<N, R, C> where
C: Dim,
R: Dim,
[src]
C: Dim,
R: Dim,
Auto Trait Implementations
impl<N, R, C> RefUnwindSafe for VecStorage<N, R, C> where
C: RefUnwindSafe,
N: RefUnwindSafe,
R: RefUnwindSafe,
[src]
C: RefUnwindSafe,
N: RefUnwindSafe,
R: RefUnwindSafe,
impl<N, R, C> Send for VecStorage<N, R, C> where
N: Send,
[src]
N: Send,
impl<N, R, C> Sync for VecStorage<N, R, C> where
N: Sync,
[src]
N: Sync,
impl<N, R, C> Unpin for VecStorage<N, R, C> where
C: Unpin,
N: Unpin,
R: Unpin,
[src]
C: Unpin,
N: Unpin,
R: Unpin,
impl<N, R, C> UnwindSafe for VecStorage<N, R, C> where
C: UnwindSafe,
N: UnwindSafe,
R: UnwindSafe,
[src]
C: UnwindSafe,
N: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Resource for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,