diff -r d8305c9b6fdf -r f7b87d84864d src/nalgebra_support.rs --- a/src/nalgebra_support.rs Sat Dec 21 23:32:20 2024 -0500 +++ b/src/nalgebra_support.rs Sun Dec 22 14:54:46 2024 -0500 @@ -1,7 +1,7 @@ /*! Integration with nalgebra. -This module mainly implements [`Euclidean`], [`Norm`], [`Dot`], [`Linear`], etc. for [`nalgebra`] +This module mainly implements [`Euclidean`], [`Norm`], [`Linear`], etc. for [`nalgebra`] matrices and vectors. It also provides [`ToNalgebraRealField`] as a vomit-inducingly ugly workaround to nalgebra force-feeding its own versions of the same basic mathematical methods on `f32` and `f64` as @@ -153,20 +153,6 @@ } } -impl Dot,E> -for Vector -where M : Dim, - E : Float + Scalar + Zero + One, - S : Storage, - Si : Storage, - DefaultAllocator : Allocator { - - #[inline] - fn dot(&self, other : &Vector) -> E { - Vector::::dot(self, other) - } -} - /// This function is [`nalgebra::EuclideanNorm::metric_distance`] without the `sqrt`. #[inline] fn metric_distance_squared( @@ -200,7 +186,12 @@ DefaultAllocator : Allocator { type Output = OVector; - + + #[inline] + fn dot>(&self, other : I) -> E { + Vector::::dot(self, other.ref_instance()) + } + #[inline] fn norm2_squared(&self) -> E { Vector::::norm_squared(self)