Type Alias Matrix

Source
pub type Matrix<T, const M: usize, const N: usize> = Vector<Vector<T, M>, N>;
Expand description

Matrix is just a type alias for Vector.

Supports some matrix specific maths operations, namely matrix multiplication and transpose

A Vector<Vector<Vector<…>>> can also be considered a matrix and as such has those operations defined too.

Aliased Type§

#[repr(align(16))]
pub struct Matrix<T, const M: usize, const N: usize> { /* private fields */ }

Implementations§

Source§

impl<T, const M: usize, const N: usize> Matrix<T, M, N>

Source

pub fn transpose(&self) -> TransposedMatrixView<'_, T, N, M>

Source§

impl<'a, 'b, T, const M: usize, const N: usize> Matrix<T, M, N>
where &'a T: Mul<&'b T, Output = T>, T: Sum + 'a + 'b + Clone + Copy + Default,

Source

pub fn matrix_multiply<const O: usize>( &'a self, other: &'b Matrix<T, N, O>, ) -> Matrix<T, M, O>