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