pub struct Matrix<const R: usize, const C: usize> { /* private fields */ }Expand description
Dense R×C matrix, row-major (self[(row, col)]).
Implementations§
Source§impl<const R: usize, const C: usize> Matrix<R, C>
impl<const R: usize, const C: usize> Matrix<R, C>
pub fn from_rows(data: [[Scalar; C]; R]) -> Self
pub fn zero() -> Self
Sourcepub fn from_columns(cols: [Vector<R>; C]) -> Self
pub fn from_columns(cols: [Vector<R>; C]) -> Self
Build from C column vectors, each an R-vector.
pub fn row(&self, r: usize) -> Vector<C>
pub fn col(&self, c: usize) -> Vector<R>
pub fn transpose(&self) -> Matrix<C, R>
Trait Implementations§
impl<const R: usize, const C: usize> Copy for Matrix<R, C>
Auto Trait Implementations§
impl<const R: usize, const C: usize> Freeze for Matrix<R, C>
impl<const R: usize, const C: usize> RefUnwindSafe for Matrix<R, C>
impl<const R: usize, const C: usize> Send for Matrix<R, C>
impl<const R: usize, const C: usize> Sync for Matrix<R, C>
impl<const R: usize, const C: usize> Unpin for Matrix<R, C>
impl<const R: usize, const C: usize> UnsafeUnpin for Matrix<R, C>
impl<const R: usize, const C: usize> UnwindSafe for Matrix<R, C>
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