diff -r 4c2e5e65d510 -r f2fc6115b897 src/linops.rs --- a/src/linops.rs Tue Dec 31 23:34:47 2024 -0500 +++ b/src/linops.rs Tue Dec 31 23:49:09 2024 -0500 @@ -22,10 +22,8 @@ F : Num, X : Space, { - type Owned : AXPY; - /// Computes `βy + αx`, where `y` is `Self`. - fn add_mul>(self, α : F, x : I, β : F) -> Self::Owned ; + fn add_mul>(self, α : F, x : I, β : F) -> X; /// Computes `y = βy + αx`, where `y` is `Self`. fn axpy>(&mut self, α : F, x : I, β : F); @@ -41,7 +39,7 @@ } /// Return a similar zero as `self`. - fn similar_origin(&self) -> Self::Owned; + fn similar_origin(&self) -> X; /// Set self to zero. fn set_zero(&mut self); @@ -49,10 +47,12 @@ /// Efficient in-place application for [`Linear`] operators. #[replace_float_literals(F::cast_from(literal))] -pub trait GEMV = >::Codomain> : Linear { +pub trait GEMV = >::Codomain> + : Linear +{ /// Computes `αAx + βy`, where `A` is `Self`. - fn apply_add_mul>(&self, y : Y, α : F, x : I, β : F) -> Y::Owned { + fn apply_add_mul>(&self, y : Y, α : F, x : I, β : F) -> Y { y.add_mul(α, self.apply(x), β) }