diff -r f75bf34adda0 -r d2994e34a5f5 src/direct_product.rs --- a/src/direct_product.rs Sun May 11 02:03:45 2025 -0500 +++ b/src/direct_product.rs Mon May 12 15:42:48 2025 -0500 @@ -244,13 +244,13 @@ impl_binary_mut!(SubAssign, sub_assign); macro_rules! impl_scalar_mut { - ($trait:ident, $fn:ident, $F:ty) => { - impl<'a, A, B> $trait<$F> for Pair + ($trait:ident, $fn:ident) => { + impl<'a, A, B, F: Num> $trait for Pair where - A: $trait<$F>, - B: $trait<$F>, + A: $trait, + B: $trait, { - fn $fn(&mut self, t: $F) { + fn $fn(&mut self, t: F) { let Pair(ref mut a, ref mut b) = self; a.$fn(t); b.$fn(t); @@ -259,10 +259,8 @@ }; } -impl_scalar_mut!(MulAssign, mul_assign, f32); -impl_scalar_mut!(MulAssign, mul_assign, f64); -impl_scalar_mut!(DivAssign, div_assign, f32); -impl_scalar_mut!(DivAssign, div_assign, f64); +impl_scalar_mut!(MulAssign, mul_assign); +impl_scalar_mut!(DivAssign, div_assign); /// We only support 'closed' `Euclidean` `Pair`s, as more general ones cause /// compiler overflows. @@ -303,17 +301,20 @@ } } -impl AXPY> for Pair +impl AXPY> for Pair where U: Space, V: Space, - A: AXPY, - B: AXPY, + A: AXPY, + B: AXPY, F: Num, Self: MulAssign, Pair: MulAssign, - Pair: AXPY>, + //A::Owned: MulAssign, + //B::Owned: MulAssign, + //Pair: AXPY, Field = F>, { + type Field = F; type Owned = Pair; fn axpy>>(&mut self, α: F, x: I, β: F) {