Trait Transpose

Source
pub trait Transpose: Matrix
where Self::Output: Matrix,
{ type Output; // Required method fn transpose(&self) -> Self::Output; }

Required Associated Types§

Required Methods§

Source

fn transpose(&self) -> Self::Output

Returns the transposed version of the given matrix

Aᵀ

§Examples
let a = [
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0]
];
let at = [
    [1.0, 4.0],
    [2.0, 5.0],
    [3.0, 6.0]
];
assert_eq!(a.transpose(), at);

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<F: Clone, const L: usize, const H: usize> Transpose for [[F; L]; H]
where Self: Matrix, [[F; H]; L]: Matrix,

Source§

type Output = [[F; H]; L]

Source§

fn transpose(&self) -> Self::Output

Implementors§