Trait Outer

Source
pub trait Outer<Rhs: Vector>: Vector
where Self::Output: Matrix,
{ type Output; // Required method fn outer(self, rhs: Rhs) -> Self::Output; }

Required Associated Types§

Required Methods§

Source

fn outer(self, rhs: Rhs) -> Self::Output

Returns the outer product of two vector-arrays

u ⊗ v

§Arguments
  • rhs - A vector
§Examples
let u = [1.0, 2.0, 3.0];
let v = [1.0, 2.0, 3.0];
let uv = [
    [1.0, 2.0, 3.0],
    [2.0, 4.0, 6.0],
    [3.0, 6.0, 9.0]
];
 
assert_eq!(u.outer(v), uv);

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, const L: usize, const H: usize> Outer<[F; L]> for [F; H]
where Self: Vector, [F; L]: Vector, [[<F as Mul<F>>::Output; L]; H]: Matrix, F: Mul<F> + Clone,

Source§

type Output = [[<F as Mul>::Output; L]; H]

Source§

fn outer(self, rhs: [F; L]) -> Self::Output

Implementors§