use crate::VectorSpace;
pub trait OuterProduct<T = Self>: VectorSpace {
type Output;
fn outer(self, other: T) -> <Self as OuterProduct<T>>::Output;
}
pub trait DotProduct<T = Self>: VectorSpace {
type Output;
fn dot(self, other: T) -> <Self as DotProduct<T>>::Output;
}
impl DotProduct for f32 {
type Output = f32;
fn dot(self, other: Self) -> f32 {
self * other
}
}
impl DotProduct for f64 {
type Output = f64;
fn dot(self, other: Self) -> f64 {
self * other
}
}