pub struct V1Matrix<T, V, L>{ /* private fields */ }
Expand description
A matrix represented by a flat one-dimensional vector V1
.
Trait Implementations§
Source§impl<T, V, L> Matrix<T> for V1Matrix<T, V, L>
impl<T, V, L> Matrix<T> for V1Matrix<T, V, L>
Source§fn at(&self, idx: impl IntoIdx<D2>) -> T
fn at(&self, idx: impl IntoIdx<D2>) -> T
Returns the element at the given
idx
of the matrix. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns an iterator of all elements of the matrix.
The direction of iteration depends on whether the matrix is row-major
or column-major. Read more
Source§fn in_bounds(&self, idx: impl Into<<D2 as Dim>::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<<D2 as Dim>::LeqIdx>) -> bool
Returns true if the given
idx
is in bounds of the matrix.Source§impl<T, V> MatrixColMajor<T> for V1Matrix<T, V, V1LayoutColMajor>
impl<T, V> MatrixColMajor<T> for V1Matrix<T, V, V1LayoutColMajor>
Source§impl<T, V> MatrixColMajorMut<T> for V1Matrix<T, V, V1LayoutColMajor>
impl<T, V> MatrixColMajorMut<T> for V1Matrix<T, V, V1LayoutColMajor>
Source§impl<T, V, L> MatrixMut<T> for V1Matrix<T, V, L>
impl<T, V, L> MatrixMut<T> for V1Matrix<T, V, L>
Source§fn at_mut<Idx: IntoIdx<D2>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D2>>(&mut self, idx: Idx) -> &mut T
Returns a mutable reference to the element at the given
idx
of the matrix. Read moreSource§fn mut_all<F>(&mut self, f: F)
fn mut_all<F>(&mut self, f: F)
Applies the mutating function
f
over all elements of the matrix.Source§fn reset_all(&mut self, value: T)
fn reset_all(&mut self, value: T)
Sets all elements of the matrix to the given
value
.
This method is often used at initialization stage of algorithms. Read moreSource§impl<T, V> MatrixRowMajor<T> for V1Matrix<T, V, V1LayoutRowMajor>
impl<T, V> MatrixRowMajor<T> for V1Matrix<T, V, V1LayoutRowMajor>
Auto Trait Implementations§
impl<T, V, L> Freeze for V1Matrix<T, V, L>
impl<T, V, L> RefUnwindSafe for V1Matrix<T, V, L>
impl<T, V, L> Send for V1Matrix<T, V, L>
impl<T, V, L> Sync for V1Matrix<T, V, L>
impl<T, V, L> Unpin for V1Matrix<T, V, L>
impl<T, V, L> UnwindSafe for V1Matrix<T, V, L>
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