diff -r d8305c9b6fdf -r f7b87d84864d src/loc.rs --- a/src/loc.rs Sat Dec 21 23:32:20 2024 -0500 +++ b/src/loc.rs Sun Dec 22 14:54:46 2024 -0500 @@ -429,19 +429,17 @@ domination!(Linfinity, L2); domination!(L2, L1); -impl Dot,F> for Loc { +impl Euclidean for Loc { + type Output = Self; + /// This implementation is not stabilised as it's meant to be used for very small vectors. /// Use [`nalgebra`] for larger vectors. #[inline] - fn dot(&self, other : &Loc) -> F { + fn dot>(&self, other : I) -> F { self.0.iter() - .zip(other.0.iter()) + .zip(other.ref_instance().0.iter()) .fold(F::ZERO, |m, (&v, &w)| m + v * w) } -} - -impl Euclidean for Loc { - type Output = Self; /// This implementation is not stabilised as it's meant to be used for very small vectors. /// Use [`nalgebra`] for larger vectors. @@ -696,7 +694,7 @@ type Decomp = BasicDecomposition; } -impl Mapping> for Loc { +impl Mapping> for Loc { type Codomain = F; fn apply>>(&self, x : I) -> Self::Codomain { @@ -704,9 +702,9 @@ } } -impl Linear> for Loc { } +impl Linear> for Loc { } -impl AXPY> for Loc { +impl AXPY> for Loc { type Owned = Self; #[inline]