Sun, 22 Dec 2024 17:24:33 -0500
Reduce preadjointing constraints
src/linops.rs | file | annotate | diff | comparison | revisions |
--- a/src/linops.rs Sun Dec 22 15:30:34 2024 -0500 +++ b/src/linops.rs Sun Dec 22 17:24:33 2024 -0500 @@ -107,11 +107,13 @@ /// operator. The space `Ypre` is the predual of its codomain, and should be the /// domain of the adjointed operator. `Self::Preadjoint` should be /// [`Adjointable`]`<'a,Ypre,X>`. - +/// We do not make additional restrictions on `Self::Preadjoint` (in particular, it +/// does not have to be adjointable) to allow `X` to be a subspace yet the preadjoint +/// have the full space as the codomain, etc. pub trait Preadjointable<X : Space, Ypre : Space> : Linear<X> { type PreadjointCodomain : Space; - type Preadjoint<'a> : Adjointable< - Ypre, X, AdjointCodomain=Self::Codomain, Codomain=Self::PreadjointCodomain + type Preadjoint<'a> : Linear< + Ypre, Codomain=Self::PreadjointCodomain > where Self : 'a; /// Form the adjoint operator of `self`. @@ -369,10 +371,8 @@ S : Preadjointable<A, Yʹ>, T : Preadjointable<B, Yʹ>, Self : Linear<Pair<A, B>>, - for<'a> ColOp<S::Preadjoint<'a>, T::Preadjoint<'a>> : Adjointable< - Yʹ, Pair<A,B>, - Codomain=Pair<S::PreadjointCodomain, T::PreadjointCodomain>, - AdjointCodomain = Self::Codomain, + for<'a> ColOp<S::Preadjoint<'a>, T::Preadjoint<'a>> : Linear< + Yʹ, Codomain=Pair<S::PreadjointCodomain, T::PreadjointCodomain>, >, { type PreadjointCodomain = Pair<S::PreadjointCodomain, T::PreadjointCodomain>; @@ -415,10 +415,8 @@ S : Preadjointable<A, Xʹ, PreadjointCodomain = R>, T : Preadjointable<A, Yʹ, PreadjointCodomain = R>, Self : Linear<A>, - for<'a> RowOp<S::Preadjoint<'a>, T::Preadjoint<'a>> : Adjointable< - Pair<Xʹ,Yʹ>, A, - Codomain = R, - AdjointCodomain = Self::Codomain, + for<'a> RowOp<S::Preadjoint<'a>, T::Preadjoint<'a>> : Linear< + Pair<Xʹ,Yʹ>, Codomain = R, >, { type PreadjointCodomain = R; @@ -518,10 +516,8 @@ S : Preadjointable<A, Xʹ>, T : Preadjointable<B, Yʹ>, Self : Linear<Pair<A, B>>, - for<'a> DiagOp<S::Preadjoint<'a>, T::Preadjoint<'a>> : Adjointable< - Pair<Xʹ,Yʹ>, Pair<A, B>, - Codomain=R, - AdjointCodomain = Self::Codomain, + for<'a> DiagOp<S::Preadjoint<'a>, T::Preadjoint<'a>> : Linear< + Pair<Xʹ,Yʹ>, Codomain=R, >, { type PreadjointCodomain = R;