Trait array_math::SquareArray2dOps

source ·
pub trait SquareArray2dOps<T, const N: usize>: Array2dOps<T, N, N> {
    // Required method
    fn transpose_assign(&mut self);
}

Required Methods§

source

fn transpose_assign(&mut self)

Transposes a square matrix in-place.

§Examples
use array__ops::*;
 
let mut a = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
];
 
a.transpose_assign();
 
assert_eq!(a, [
    [1, 4, 7],
    [2, 5, 8],
    [3, 6, 9]
]);

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, const N: usize> SquareArray2dOps<T, N> for [[T; N]; N]

Implementors§