pub struct Standard<T> { /* private fields */ }Expand description
Metadata for dense row-major matrices of Copy types.
Rows are stored contiguously as &[T] slices. This is the default representation
type for standard floating-point multi-vectors.
§Row Types
Row<'a>:&'a [T]RowMut<'a>:&'a mut [T]
Implementations§
Source§impl<T: Copy> Standard<T>
impl<T: Copy> Standard<T>
Sourcepub fn new(nrows: usize, ncols: usize) -> Result<Self, Overflow>
pub fn new(nrows: usize, ncols: usize) -> Result<Self, Overflow>
Create a new Standard for data of type T.
Successful construction requires:
- The total number of elements determined by
nrows * ncolsdoes not exceedusize::MAX. - The total memory footprint defined by
ncols * nrows * size_of::<T>()does not exceedisize::MAX.
Sourcepub fn num_elements(&self) -> usize
pub fn num_elements(&self) -> usize
Returns the number of total elements (rows x cols) in this matrix.
Trait Implementations§
Source§impl<T: Copy> Repr for Standard<T>
impl<T: Copy> Repr for Standard<T>
Source§fn layout(&self) -> Result<Layout, LayoutError>
fn layout(&self) -> Result<Layout, LayoutError>
Returns the memory layout for a memory allocation containing
Repr::nrows vectors
each with vector dimension [Repr::ncols]. Read moreimpl<T: Copy> Copy for Standard<T>
impl<T: Eq> Eq for Standard<T>
impl<T> StructuralPartialEq for Standard<T>
Auto Trait Implementations§
impl<T> Freeze for Standard<T>
impl<T> RefUnwindSafe for Standard<T>where
T: RefUnwindSafe,
impl<T> Send for Standard<T>where
T: Send,
impl<T> Sync for Standard<T>where
T: Sync,
impl<T> Unpin for Standard<T>where
T: Unpin,
impl<T> UnsafeUnpin for Standard<T>
impl<T> UnwindSafe for Standard<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more