Struct mat::Mat
[−]
[src]
pub struct Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS>,
Prod<NROWS, NCOLS>: ArrayLength<T>, { /* fields omitted */ }
Statically allocated (row major order) matrix
Trait Implementations
impl<T: Clone, NROWS: Clone, NCOLS: Clone> Clone for Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS>,
Prod<NROWS, NCOLS>: ArrayLength<T>,
[src]
NROWS: Mul<NCOLS>,
Prod<NROWS, NCOLS>: ArrayLength<T>,
fn clone(&self) -> Mat<T, NROWS, NCOLS>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T, NROWS, NCOLS> Debug for Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS>,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
T: Debug,
[src]
NROWS: Mul<NCOLS>,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
T: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a, T, NROWS, NCOLS> Matrix for &'a Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
T: Copy,
[src]
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
T: Copy,
type NROWS = NROWS
Number of rows
type NCOLS = NCOLS
Number of columns
fn get(self, r: usize, c: usize) -> Self::Elem
[src]
Returns the element at row r
and column c
Read more
fn size(self) -> (usize, usize)
[src]
Returns the size of the matrix
fn nrows(self) -> usize
[src]
Returns the number of rows of the matrix
fn ncols(self) -> usize
[src]
Returns the number of columns of the matrix
impl<'a, T, NROWS, NCOLS> UnsafeGet for &'a Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
T: Copy,
[src]
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
T: Copy,
type Elem = T
The matrix element type
unsafe fn unsafe_get(self, r: usize, c: usize) -> T
[src]
Returns the element at row r
and column c
with performing bounds checks
impl<T, NROWS, NCOLS> Index<usize> for Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: ArrayLength<T> + Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
[src]
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: ArrayLength<T> + Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
type Output = Row<T, NCOLS>
The returned type after indexing.
fn index(&self, r: usize) -> &Row<T, NCOLS>
[src]
Performs the indexing (container[index]
) operation.
impl<T, NROWS, NCOLS> IndexMut<usize> for Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: ArrayLength<T> + Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
[src]
NROWS: Mul<NCOLS> + Unsigned,
NCOLS: ArrayLength<T> + Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
fn index_mut(&mut self, r: usize) -> &mut Row<T, NCOLS>
[src]
Performs the mutable indexing (container[index]
) operation.
impl<'a, T, NROWS, NCOLS, R> Mul<R> for &'a Mat<T, NROWS, NCOLS> where
NROWS: Mul<NCOLS>,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
R: Matrix<NROWS = NCOLS>,
[src]
NROWS: Mul<NCOLS>,
NCOLS: Unsigned,
Prod<NROWS, NCOLS>: ArrayLength<T>,
R: Matrix<NROWS = NCOLS>,