[−][src]Struct oxygengine_physics_2d::prelude::nalgebra::VecStorage
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>) -> 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>
[src]
The underlying data storage.
pub unsafe fn as_vec_mut(&mut self) -> &mut Vec<N>
[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>
[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.
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,
fn clone(&self) -> VecStorage<N, R, C>
[src]
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<'de, N, R, C> Deserialize<'de> for VecStorage<N, R, C> where
C: Dim + Deserialize<'de>,
N: Deserialize<'de>,
R: Dim + Deserialize<'de>,
[src]
C: Dim + Deserialize<'de>,
N: Deserialize<'de>,
R: Dim + Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<VecStorage<N, R, C>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<VecStorage<N, R, C>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
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,
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
.
fn extend_one(&mut self, item: A)
[src]
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>,
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
.
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<N, R> Extend<N> for VecStorage<N, R, Dynamic> where
R: Dim,
[src]
R: Dim,
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
.
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<N> Extend<N> for VecStorage<N, Dynamic, U1>
[src]
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.
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<N, R, C> Into<Vec<N>> 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>,
fn eq(&self, other: &VecStorage<N, R, C>) -> bool
[src]
fn ne(&self, other: &VecStorage<N, R, C>) -> bool
[src]
impl<N, R, C> Serialize for VecStorage<N, R, C> where
C: Dim + Serialize,
N: Serialize,
R: Dim + Serialize,
[src]
C: Dim + Serialize,
N: Serialize,
R: Dim + Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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.
fn ptr(&self) -> *const N
[src]
fn shape(&self) -> (Dynamic, C)
[src]
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)
fn is_contiguous(&self) -> bool
[src]
fn into_owned(self) -> <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer where
DefaultAllocator: Allocator<N, Dynamic, C>,
[src]
DefaultAllocator: Allocator<N, Dynamic, C>,
fn clone_owned(&self) -> <DefaultAllocator as Allocator<N, Dynamic, C>>::Buffer where
DefaultAllocator: Allocator<N, Dynamic, C>,
[src]
DefaultAllocator: Allocator<N, Dynamic, C>,
fn as_slice(&self) -> &[N]ⓘ
[src]
fn linear_index(&self, irow: usize, icol: usize) -> usize
[src]
unsafe fn get_address_unchecked_linear(&self, i: usize) -> *const N
[src]
unsafe fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const N
[src]
unsafe fn get_unchecked_linear(&self, i: usize) -> &N
[src]
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.
fn ptr(&self) -> *const N
[src]
fn shape(&self) -> (R, Dynamic)
[src]
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)
fn is_contiguous(&self) -> bool
[src]
fn into_owned(self) -> <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer where
DefaultAllocator: Allocator<N, R, Dynamic>,
[src]
DefaultAllocator: Allocator<N, R, Dynamic>,
fn clone_owned(&self) -> <DefaultAllocator as Allocator<N, R, Dynamic>>::Buffer where
DefaultAllocator: Allocator<N, R, Dynamic>,
[src]
DefaultAllocator: Allocator<N, R, Dynamic>,
fn as_slice(&self) -> &[N]ⓘ
[src]
fn linear_index(&self, irow: usize, icol: usize) -> usize
[src]
unsafe fn get_address_unchecked_linear(&self, i: usize) -> *const N
[src]
unsafe fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const N
[src]
unsafe fn get_unchecked_linear(&self, i: usize) -> &N
[src]
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>,
fn ptr_mut(&mut self) -> *mut N
[src]
fn as_mut_slice(&mut self) -> &mut [N]ⓘ
[src]
unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut N
[src]
unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut N
[src]
&mut self,
irow: usize,
icol: usize
) -> *mut N
unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N
[src]
unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut N
[src]
unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
[src]
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>,
fn ptr_mut(&mut self) -> *mut N
[src]
fn as_mut_slice(&mut self) -> &mut [N]ⓘ
[src]
unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut N
[src]
unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut N
[src]
&mut self,
irow: usize,
icol: usize
) -> *mut N
unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut N
[src]
unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut N
[src]
unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
[src]
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)
)
Auto Trait Implementations
impl<N, R, C> RefUnwindSafe for VecStorage<N, R, C> where
C: RefUnwindSafe,
N: RefUnwindSafe,
R: RefUnwindSafe,
C: RefUnwindSafe,
N: RefUnwindSafe,
R: RefUnwindSafe,
impl<N, R, C> Send for VecStorage<N, R, C> where
N: Send,
N: Send,
impl<N, R, C> Sync for VecStorage<N, R, C> where
N: Sync,
N: Sync,
impl<N, R, C> Unpin for VecStorage<N, R, C> where
C: Unpin,
N: Unpin,
R: Unpin,
C: Unpin,
N: Unpin,
R: Unpin,
impl<N, R, C> UnwindSafe for VecStorage<N, R, C> where
C: UnwindSafe,
N: UnwindSafe,
R: UnwindSafe,
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,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
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,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
T: Any,
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>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
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.
fn to_owned(&self) -> T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UserData for T where
T: Clone + Send + Sync + Any,
[src]
T: Clone + Send + Sync + Any,
fn clone_boxed(&self) -> Box<dyn UserData + 'static>
[src]
fn to_any(&self) -> Box<dyn Any + 'static + Sync + Send>
[src]
fn as_any(&self) -> &(dyn Any + 'static + Sync + Send)
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,