Trait array_math::Array2dOps 
source · pub trait Array2dOps<T, const M: usize, const N: usize>: ArrayOps<[T; N], M> {
    // Required methods
    fn transpose(self) -> [[T; M]; N];
    fn mul_kronecker<Rhs, const H: usize, const W: usize>(
        &self,
        rhs: &[[Rhs; W]; H]
    ) -> [[<T as Mul<Rhs>>::Output; { _ }]; { _ }]
       where T: Mul<Rhs> + Copy,
             Rhs: Copy;
    fn into_diagonal(self) -> [T; { _ }];
    fn diagonal_ref(&self) -> [&T; { _ }];
    fn diagonal_mut(&mut self) -> [&mut T; { _ }];
}Required Methods§
sourcefn transpose(self) -> [[T; M]; N]
 
fn transpose(self) -> [[T; M]; N]
Transposes a two-dimensional array (as if it were a matrix)
§Example
use array__ops::*;
 
let matrix: [[u8; 5]; 3] = [
    [1,   2,  3,  4,  5],
    [6,   7,  8,  9, 10],
    [11, 12, 13, 14, 15]
];
 
assert_eq!(matrix.transpose(), [
    [1,  6, 11],
    [2,  7, 12],
    [3,  8, 13],
    [4,  9, 14],
    [5, 10, 15]
]);fn mul_kronecker<Rhs, const H: usize, const W: usize>( &self, rhs: &[[Rhs; W]; H] ) -> [[<T as Mul<Rhs>>::Output; { _ }]; { _ }]
fn into_diagonal(self) -> [T; { _ }]
fn diagonal_ref(&self) -> [&T; { _ }]
fn diagonal_mut(&mut self) -> [&mut T; { _ }]
Object Safety§
This trait is not object safe.