Wed, 03 Sep 2025 10:08:28 -0500
OwnedSpace -> Principal
| src/bisection_tree/btfn.rs | file | annotate | diff | comparison | revisions | |
| src/convex.rs | file | annotate | diff | comparison | revisions | |
| src/direct_product.rs | file | annotate | diff | comparison | revisions | |
| src/euclidean.rs | file | annotate | diff | comparison | revisions | |
| src/instance.rs | file | annotate | diff | comparison | revisions | |
| src/linops.rs | file | annotate | diff | comparison | revisions | |
| src/loc.rs | file | annotate | diff | comparison | revisions | |
| src/nalgebra_support.rs | file | annotate | diff | comparison | revisions | |
| src/norms.rs | file | annotate | diff | comparison | revisions | |
| src/sets.rs | file | annotate | diff | comparison | revisions |
--- a/src/bisection_tree/btfn.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/bisection_tree/btfn.rs Wed Sep 03 10:08:28 2025 -0500 @@ -66,7 +66,7 @@ G::SupportType: LocalAnalysis<F, BT::Agg, N>, BT: BTImpl<N, F>, { - type OwnedSpace = Self; + type Principal = Self; type Decomp = BasicDecomposition; }
--- a/src/convex.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/convex.rs Wed Sep 03 10:08:28 2025 -0500 @@ -57,7 +57,7 @@ /// The conjugate type has to implement [`ConvexMapping`], but a `Conjugable` mapping need /// not be convex. pub trait Prox<Domain: Space>: Mapping<Domain> { - type Prox<'a>: Mapping<Domain, Codomain = Domain::OwnedSpace> + type Prox<'a>: Mapping<Domain, Codomain = Domain::Principal> where Self: 'a; @@ -65,15 +65,15 @@ fn prox_mapping(&self, τ: Self::Codomain) -> Self::Prox<'_>; /// Calculate the proximal mapping with weight τ - fn prox<I: Instance<Domain>>(&self, τ: Self::Codomain, z: I) -> Domain::OwnedSpace { + fn prox<I: Instance<Domain>>(&self, τ: Self::Codomain, z: I) -> Domain::Principal { self.prox_mapping(τ).apply(z) } /// Calculate the proximal mapping with weight τ in-place - fn prox_mut<'b>(&self, τ: Self::Codomain, y: &'b mut Domain::OwnedSpace) + fn prox_mut<'b>(&self, τ: Self::Codomain, y: &'b mut Domain::Principal) where Domain::Decomp: DecompositionMut<Domain>, - for<'a> &'a Domain::OwnedSpace: Instance<Domain>, + for<'a> &'a Domain::Principal: Instance<Domain>, { *y = self.prox(τ, &*y); } @@ -98,7 +98,7 @@ impl<F, E, Domain> Mapping<Domain> for NormConstraint<F, E> where Domain: Space, - Domain::OwnedSpace: Norm<E, F>, + Domain::Principal: Norm<E, F>, F: Float, E: NormExponent, { @@ -127,7 +127,7 @@ E: HasDualExponent, F: Float, Domain: HasDual<F>, - Domain::OwnedSpace: Norm<E, F>, + Domain::Principal: Norm<E, F>, <Domain as HasDual<F>>::DualSpace: Norm<E::DualExp, F>, { type Conjugate<'a> @@ -146,7 +146,7 @@ E: HasDualExponent, F: Float, Domain: HasDual<F>, - Domain::OwnedSpace: Norm<E, F>, + Domain::Principal: Norm<E, F>, <Domain as HasDual<F>>::DualSpace: Norm<E::DualExp, F>, { type Conjugate<'a> @@ -165,10 +165,10 @@ impl<Domain, E, F> Prox<Domain> for NormConstraint<F, E> where Domain: Space, - Domain::OwnedSpace: Norm<E, F>, + Domain::Principal: Norm<E, F>, E: NormExponent, F: Float, - NormProjection<F, E>: Mapping<Domain, Codomain = Domain::OwnedSpace>, + NormProjection<F, E>: Mapping<Domain, Codomain = Domain::Principal>, { type Prox<'a> = NormProjection<F, E> @@ -206,11 +206,11 @@ impl<F, E, Domain> Mapping<Domain> for NormProjection<F, E> where Domain: Space, - Domain::OwnedSpace: ClosedSpace + Projection<F, E>, + Domain::Principal: ClosedSpace + Projection<F, E>, F: Float, E: NormExponent, { - type Codomain = Domain::OwnedSpace; + type Codomain = Domain::Principal; fn apply<I: Instance<Domain>>(&self, d: I) -> Self::Codomain { d.own().proj_ball(self.radius, self.exponent) @@ -253,7 +253,7 @@ impl<Domain, Predual, F: Float> Preconjugable<Domain, Predual, F> for Zero<Domain, F> where Domain: Normed<F>, - Predual: HasDual<F, Owned = Predual>, + Predual: HasDual<F, PrincipalV = Predual>, { type Preconjugate<'a> = ZeroIndicator<Predual, F> @@ -292,7 +292,7 @@ where F: Float, Domain: Space, - Domain::OwnedSpace: Normed<F>, + Domain::Principal: Normed<F>, { type Codomain = F; @@ -305,7 +305,7 @@ impl<Domain, F: Float> ConvexMapping<Domain, F> for ZeroIndicator<Domain, F> where Domain: Space, - Domain::OwnedSpace: Normed<F>, + Domain::Principal: Normed<F>, { fn factor_of_strong_convexity(&self) -> F { F::INFINITY @@ -315,7 +315,7 @@ impl<Domain, F: Float> Conjugable<Domain, F> for ZeroIndicator<Domain, F> where Domain: HasDual<F>, - Domain::Owned: Normed<F>, + Domain::PrincipalV: Normed<F>, { type Conjugate<'a> = Zero<Domain::DualSpace, F> @@ -331,7 +331,7 @@ impl<Domain, Predual, F: Float> Preconjugable<Domain, Predual, F> for ZeroIndicator<Domain, F> where Domain: Space, - Domain::OwnedSpace: Normed<F>, + Domain::Principal: Normed<F>, Predual: HasDual<F>, { type Preconjugate<'a> @@ -347,7 +347,7 @@ impl<Domain, F> Prox<Domain> for ZeroIndicator<Domain, F> where - Domain: AXPY<Field = F, Owned = Domain> + Normed<F>, + Domain: AXPY<Field = F, PrincipalV = Domain> + Normed<F>, F: Float, { type Prox<'a> @@ -430,7 +430,7 @@ F: Float, X: Euclidean<F>, { - type Derivative = X::Owned; + type Derivative = X::PrincipalV; fn differential_impl<I: Instance<X>>(&self, x: I) -> Self::Derivative { x.into_owned()
--- a/src/direct_product.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/direct_product.rs Wed Sep 03 10:08:28 2025 -0500 @@ -311,7 +311,7 @@ // + for<'b> SubAssign<&'b Self> // + Neg<Output = Self::OwnedEuclidean>, { - type OwnedEuclidean = Pair<A::OwnedEuclidean, B::OwnedEuclidean>; + type PrincipalE = Pair<A::PrincipalE, B::PrincipalE>; fn dot<I: Instance<Self>>(&self, other: I) -> F { other.eval_decompose(|Pair(u, v)| self.0.dot(u) + self.1.dot(v)) @@ -333,10 +333,10 @@ F: Num, { type Field = F; - type Owned = Pair<A::Owned, B::Owned>; + type PrincipalV = Pair<A::PrincipalV, B::PrincipalV>; /// Return a similar zero as `self`. - fn similar_origin(&self) -> Self::Owned { + fn similar_origin(&self) -> Self::PrincipalV { Pair(self.0.similar_origin(), self.1.similar_origin()) } @@ -389,7 +389,7 @@ pub struct PairDecomposition<D, Q>(D, Q); impl<A: Space, B: Space> Space for Pair<A, B> { - type OwnedSpace = Pair<A::OwnedSpace, B::OwnedSpace>; + type Principal = Pair<A::Principal, B::Principal>; type Decomp = PairDecomposition<A::Decomp, B::Decomp>; } @@ -449,7 +449,7 @@ } #[inline] - fn cow<'b>(self) -> MyCow<'b, Pair<A::OwnedSpace, B::OwnedSpace>> + fn cow<'b>(self) -> MyCow<'b, Pair<A::Principal, B::Principal>> where Self: 'b, { @@ -457,7 +457,7 @@ } #[inline] - fn own(self) -> Pair<A::OwnedSpace, B::OwnedSpace> { + fn own(self) -> Pair<A::Principal, B::Principal> { Pair(self.0.own(), self.1.own()) } } @@ -500,7 +500,7 @@ } #[inline] - fn cow<'b>(self) -> MyCow<'b, Pair<A::OwnedSpace, B::OwnedSpace>> + fn cow<'b>(self) -> MyCow<'b, Pair<A::Principal, B::Principal>> where Self: 'b, { @@ -508,7 +508,7 @@ } #[inline] - fn own(self) -> Pair<A::OwnedSpace, B::OwnedSpace> { + fn own(self) -> Pair<A::Principal, B::Principal> { let Pair(ref u, ref v) = self; Pair(u.own(), v.own()) } @@ -601,7 +601,7 @@ { type DualSpace = Pair<A::DualSpace, B::DualSpace>; - fn dual_origin(&self) -> <Self::DualSpace as VectorSpace>::Owned { + fn dual_origin(&self) -> <Self::DualSpace as VectorSpace>::PrincipalV { Pair(self.0.dual_origin(), self.1.dual_origin()) } }
--- a/src/euclidean.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/euclidean.rs Wed Sep 03 10:08:28 2025 -0500 @@ -18,10 +18,11 @@ /// as an inner product. // TODO: remove F parameter, use VectorSpace::Field pub trait Euclidean<F: Float = f64>: - VectorSpace<Field = F, Owned = Self::OwnedEuclidean> - + Reflexive<F, DualSpace = Self::OwnedEuclidean> + VectorSpace<Field = F, PrincipalV = Self::PrincipalE> + Reflexive<F, DualSpace = Self::PrincipalE> { - type OwnedEuclidean: ClosedEuclidean<F>; + /// Principal form of the space; always equal to [`Space::Principal`] and + /// [`VectorSpace::PrincipalV`], but with more traits guaranteed. + type PrincipalE: ClosedEuclidean<F>; // Inner product fn dot<I: Instance<Self>>(&self, other: I) -> F; @@ -56,7 +57,7 @@ /// Projection to the 2-ball. #[inline] - fn proj_ball2(self, ρ: F) -> Self::Owned { + fn proj_ball2(self, ρ: F) -> Self::PrincipalV { let r = self.norm2(); if r > ρ { self * (ρ / r) @@ -67,10 +68,10 @@ } pub trait ClosedEuclidean<F: Float = f64>: - Instance<Self> + Euclidean<F, OwnedEuclidean = Self> + Instance<Self> + Euclidean<F, PrincipalE = Self> { } -impl<F: Float, X: Instance<X> + Euclidean<F, OwnedEuclidean = Self>> ClosedEuclidean<F> for X {} +impl<F: Float, X: Instance<X> + Euclidean<F, PrincipalE = Self>> ClosedEuclidean<F> for X {} // TODO: remove F parameter, use AXPY::Field pub trait EuclideanMut<F: Float = f64>: Euclidean<F> + AXPY<Field = F> { @@ -89,5 +90,5 @@ /// Trait for [`Euclidean`] spaces with dimensions known at compile time. pub trait StaticEuclidean<F: Float = f64>: Euclidean<F> { /// Returns the origin - fn origin() -> <Self as VectorSpace>::Owned; + fn origin() -> <Self as VectorSpace>::PrincipalV; }
--- a/src/instance.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/instance.rs Wed Sep 03 10:08:28 2025 -0500 @@ -113,8 +113,9 @@ } /// Trait for abitrary mathematical spaces. -pub trait Space: Ownable<OwnedVariant = Self::OwnedSpace> + Sized { - type OwnedSpace: ClosedSpace; +pub trait Space: Ownable<OwnedVariant = Self::Principal> + Sized { + /// Principal, typically owned realisation of the space. + type Principal: ClosedSpace; /// Default decomposition for the space type Decomp: Decomposition<Self>; @@ -131,8 +132,8 @@ /// Helper trait for working with closed spaces, operations in which should /// return members of the same space -pub trait ClosedSpace: Space<OwnedSpace = Self> + Owned + Instance<Self> {} -impl<X: Space<OwnedSpace = Self> + Owned + Instance<Self>> ClosedSpace for X {} +pub trait ClosedSpace: Space<Principal = Self> + Owned + Instance<Self> {} +impl<X: Space<Principal = Self> + Owned + Instance<Self>> ClosedSpace for X {} #[macro_export] macro_rules! impl_basic_space { @@ -141,7 +142,7 @@ }; ($type:ty where $($where:tt)*) => { impl<$($where)*> $crate::instance::Space for $type { - type OwnedSpace = Self; + type Principal = Self; type Decomp = $crate::instance::BasicDecomposition; } @@ -215,7 +216,7 @@ /// /// This is used, for example, by [`crate::mapping::Mapping::apply`]. pub trait Instance<X, D = <X as Space>::Decomp>: - Sized + Ownable<OwnedVariant = X::OwnedSpace> + Sized + Ownable<OwnedVariant = X::Principal> where X: Space, D: Decomposition<X>, @@ -235,7 +236,7 @@ Self: 'b; /// Returns an owned instance of `X`, cloning or converting non-true instances when necessary. - fn own(self) -> X::OwnedSpace { + fn own(self) -> X::Principal { self.into_owned() } @@ -244,7 +245,7 @@ /// Returns an owned instance or reference to `X`, converting non-true instances when necessary. /// /// Default implementation uses [`Self::own`]. Consumes the input. - fn cow<'b>(self) -> MyCow<'b, X::OwnedSpace> + fn cow<'b>(self) -> MyCow<'b, X::Principal> where Self: 'b, { @@ -255,7 +256,7 @@ /// Evaluates `f` on a reference to self. /// /// Default implementation uses [`Self::cow`]. Consumes the input. - fn eval<'b, R>(self, f: impl FnOnce(&X::OwnedSpace) -> R) -> R + fn eval<'b, R>(self, f: impl FnOnce(&X::Principal) -> R) -> R where X: 'b, Self: 'b, @@ -269,8 +270,8 @@ /// Default implementation uses [`Self::cow`]. Consumes the input. fn either<'b, R>( self, - f: impl FnOnce(X::OwnedSpace) -> R, - g: impl FnOnce(&X::OwnedSpace) -> R, + f: impl FnOnce(X::Principal) -> R, + g: impl FnOnce(&X::Principal) -> R, ) -> R where Self: 'b,
--- a/src/linops.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/linops.rs Wed Sep 03 10:08:28 2025 -0500 @@ -28,35 +28,39 @@ /// Vector spaces #[replace_float_literals(Self::Field::cast_from(literal))] pub trait VectorSpace: - Space<OwnedSpace = Self::Owned> - + Mul<Self::Field, Output = Self::Owned> - + Div<Self::Field, Output = Self::Owned> - + Add<Self, Output = Self::Owned> - + Add<Self::Owned, Output = Self::Owned> - + Sub<Self, Output = Self::Owned> - + Sub<Self::Owned, Output = Self::Owned> + Space<Principal = Self::PrincipalV> + + Mul<Self::Field, Output = Self::PrincipalV> + + Div<Self::Field, Output = Self::PrincipalV> + + Add<Self, Output = Self::PrincipalV> + + Add<Self::PrincipalV, Output = Self::PrincipalV> + + Sub<Self, Output = Self::PrincipalV> + + Sub<Self::PrincipalV, Output = Self::PrincipalV> + Neg - + for<'b> Add<&'b Self, Output = <Self as VectorSpace>::Owned> - + for<'b> Sub<&'b Self, Output = <Self as VectorSpace>::Owned> + + for<'b> Add<&'b Self, Output = <Self as VectorSpace>::PrincipalV> + + for<'b> Sub<&'b Self, Output = <Self as VectorSpace>::PrincipalV> { + /// Underlying scalar field type Field: Num; - type Owned: ClosedSpace + + /// Principal form of the space; always equal to [`Space::Principal`], but with + /// more traits guaranteed. + type PrincipalV: ClosedSpace + AXPY< Self, Field = Self::Field, - Owned = Self::Owned, - OwnedVariant = Self::Owned, - OwnedSpace = Self::Owned, + PrincipalV = Self::PrincipalV, + OwnedVariant = Self::PrincipalV, + Principal = Self::PrincipalV, >; /// Return a similar zero as `self`. - fn similar_origin(&self) -> Self::Owned; + fn similar_origin(&self) -> Self::PrincipalV; // { // self.make_origin_generator().make_origin() // } /// Return a similar zero as `x`. - fn similar_origin_inst<I: Instance<Self>>(x: I) -> Self::Owned { + fn similar_origin_inst<I: Instance<Self>>(x: I) -> Self::PrincipalV { x.eval(|xr| xr.similar_origin()) } } @@ -68,9 +72,9 @@ + MulAssign<Self::Field> + DivAssign<Self::Field> + AddAssign<Self> - + AddAssign<Self::Owned> + + AddAssign<Self::PrincipalV> + SubAssign<Self> - + SubAssign<Self::Owned> + + SubAssign<Self::PrincipalV> + for<'b> AddAssign<&'b Self> + for<'b> SubAssign<&'b Self> where @@ -93,8 +97,8 @@ fn set_zero(&mut self); } -pub trait ClosedVectorSpace: Instance<Self> + VectorSpace<Owned = Self> {} -impl<X: Instance<X> + VectorSpace<Owned = Self>> ClosedVectorSpace for X {} +pub trait ClosedVectorSpace: Instance<Self> + VectorSpace<PrincipalV = Self> {} +impl<X: Instance<X> + VectorSpace<PrincipalV = Self>> ClosedVectorSpace for X {} /// Efficient in-place application for [`Linear`] operators. #[replace_float_literals(F::cast_from(literal))] @@ -197,7 +201,7 @@ } impl<X: Space> Mapping<X> for IdOp<X> { - type Codomain = X::OwnedSpace; + type Codomain = X::Principal; fn apply<I: Instance<X>>(&self, x: I) -> Self::Codomain { x.into_owned() @@ -233,10 +237,10 @@ } } -impl<X: Clone + Space> Adjointable<X, X::OwnedSpace> for IdOp<X> { - type AdjointCodomain = X::OwnedSpace; +impl<X: Clone + Space> Adjointable<X, X::Principal> for IdOp<X> { + type AdjointCodomain = X::Principal; type Adjoint<'a> - = IdOp<X::OwnedSpace> + = IdOp<X::Principal> where X: 'a; @@ -245,10 +249,10 @@ } } -impl<X: Clone + Space> Preadjointable<X, X::OwnedSpace> for IdOp<X> { - type PreadjointCodomain = X::OwnedSpace; +impl<X: Clone + Space> Preadjointable<X, X::Principal> for IdOp<X> { + type PreadjointCodomain = X::Principal; type Preadjoint<'a> - = IdOp<X::OwnedSpace> + = IdOp<X::Principal> where X: 'a; @@ -262,9 +266,9 @@ pub struct SimpleZeroOp; impl<X: VectorSpace> Mapping<X> for SimpleZeroOp { - type Codomain = X::Owned; + type Codomain = X::PrincipalV; - fn apply<I: Instance<X>>(&self, x: I) -> X::Owned { + fn apply<I: Instance<X>>(&self, x: I) -> X::PrincipalV { X::similar_origin_inst(x) } } @@ -323,7 +327,7 @@ where Self: 'b; - fn origin(&self) -> Y::Owned; + fn origin(&self) -> Y::PrincipalV; fn as_ref(&self) -> Self::Ref<'_>; } @@ -334,7 +338,7 @@ Self: 'b; #[inline] - fn origin(&self) -> Y::Owned { + fn origin(&self) -> Y::PrincipalV { return self.similar_origin(); } @@ -351,7 +355,7 @@ Self: 'c; #[inline] - fn origin(&self) -> Y::Owned { + fn origin(&self) -> Y::PrincipalV { return self.similar_origin(); } @@ -392,8 +396,8 @@ X: HasDual<F, DualSpace = Xprime>, Y: HasDual<F, DualSpace = Yprime>, F: Float, - Xprime: VectorSpace<Field = F, Owned = Xprime>, - Xprime::Owned: AXPY<Field = F>, + Xprime: VectorSpace<Field = F, PrincipalV = Xprime>, + Xprime::PrincipalV: AXPY<Field = F>, Yprime: Space + Instance<Yprime>, { pub fn new_dualisable(y_og: OY, xprime_og: OXprime) -> Self { @@ -412,9 +416,9 @@ F: Float, OY: OriginGenerator<Y>, { - type Codomain = Y::Owned; + type Codomain = Y::PrincipalV; - fn apply<I: Instance<X>>(&self, _x: I) -> Y::Owned { + fn apply<I: Instance<X>>(&self, _x: I) -> Y::PrincipalV { self.codomain_origin_generator.origin() } } @@ -432,7 +436,7 @@ impl<X, Y, OY, O, F> GEMV<F, X, Y> for ZeroOp<X, Y, OY, O, F> where X: Space, - Y: AXPY<Field = F, Owned = Y>, + Y: AXPY<Field = F, PrincipalV = Y>, F: Float, OY: OriginGenerator<Y>, { @@ -450,7 +454,7 @@ where X: Space + Instance<X> + Norm<E1, F>, Y: VectorSpace<Field = F>, - Y::Owned: Clone, + Y::PrincipalV: Clone, F: Float, E1: NormExponent, E2: NormExponent, @@ -920,10 +924,10 @@ where F: Float, Domain: Space, - Domain::OwnedSpace: Mul<F>, - <Domain::OwnedSpace as Mul<F>>::Output: ClosedSpace, + Domain::Principal: Mul<F>, + <Domain::Principal as Mul<F>>::Output: ClosedSpace, { - type Codomain = <Domain::OwnedSpace as Mul<F>>::Output; + type Codomain = <Domain::Principal as Mul<F>>::Output; /// Compute the value of `self` at `x`. fn apply<I: Instance<Domain>>(&self, x: I) -> Self::Codomain { @@ -935,7 +939,7 @@ where F: Float, Domain: Space, - Domain::OwnedSpace: Mul<F>, - <Domain::OwnedSpace as Mul<F>>::Output: ClosedSpace, + Domain::Principal: Mul<F>, + <Domain::Principal as Mul<F>>::Output: ClosedSpace, { }
--- a/src/loc.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/loc.rs Wed Sep 03 10:08:28 2025 -0500 @@ -456,7 +456,7 @@ domination!(L2, L1); impl<F: Float, const N: usize> Euclidean<F> for Loc<N, F> { - type OwnedEuclidean = Self; + type PrincipalE = Self; /// This implementation is not stabilised as it's meant to be used for very small vectors. /// Use [`nalgebra`] for larger vectors. @@ -739,7 +739,7 @@ } impl<F: Num, const N: usize> Space for Loc<N, F> { - type OwnedSpace = Self; + type Principal = Self; type Decomp = BasicDecomposition; } @@ -755,7 +755,7 @@ impl<F: Float, const N: usize> VectorSpace for Loc<N, F> { type Field = F; - type Owned = Self; + type PrincipalV = Self; // #[inline] // fn make_origin_generator(&self) -> StaticEuclideanOriginGenerator { @@ -763,12 +763,12 @@ // } #[inline] - fn similar_origin(&self) -> Self::Owned { + fn similar_origin(&self) -> Self::PrincipalV { Self::ORIGIN } #[inline] - fn similar_origin_inst<I: Instance<Self>>(_: I) -> Self::Owned { + fn similar_origin_inst<I: Instance<Self>>(_: I) -> Self::PrincipalV { Self::ORIGIN }
--- a/src/nalgebra_support.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/nalgebra_support.rs Wed Sep 03 10:08:28 2025 -0500 @@ -95,7 +95,7 @@ DefaultAllocator: Allocator<N, M>, ShapeConstraint: StridesOk<E, N, M, SM> + StridesOk<E, N, M>, { - type OwnedSpace = OMatrix<E, N, M>; + type Principal = OMatrix<E, N, M>; type Decomp = MatrixDecomposition; } @@ -270,10 +270,10 @@ ShapeConstraint: StridesOk<E, M, N, S>, { type Field = E; - type Owned = OMatrix<E, M, N>; + type PrincipalV = OMatrix<E, M, N>; #[inline] - fn similar_origin(&self) -> Self::Owned { + fn similar_origin(&self) -> Self::PrincipalV { let (n, m) = self.shape_generic(); OMatrix::zeros_generic(n, m) } @@ -335,7 +335,7 @@ ShapeConstraint: StridesOk<E, M, U1, SM>, { #[inline] - fn proj_ball(self, ρ: E, exp: Linfinity) -> <Self as Space>::OwnedSpace { + fn proj_ball(self, ρ: E, exp: Linfinity) -> <Self as Space>::Principal { let mut owned = self.into_owned(); owned.proj_ball_mut(ρ, exp); owned @@ -418,7 +418,7 @@ DefaultAllocator: Allocator<M>, ShapeConstraint: StridesOk<E, M, U1, S>, { - type OwnedEuclidean = OVector<E, M>; + type PrincipalE = OVector<E, M>; #[inline] fn dot<I: Instance<Self>>(&self, other: I) -> E {
--- a/src/norms.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/norms.rs Wed Sep 03 10:08:28 2025 -0500 @@ -202,7 +202,7 @@ F: Float, E: NormExponent, Domain: Space, - Domain::OwnedSpace: Norm<E, F>, + Domain::Principal: Norm<E, F>, { type Codomain = F; @@ -232,18 +232,18 @@ pub trait HasDual<F: Num = f64>: Normed<F> + VectorSpace<Field = F> { type DualSpace: Normed<F> + ClosedVectorSpace<Field = F>; - fn dual_origin(&self) -> <Self::DualSpace as VectorSpace>::Owned; + fn dual_origin(&self) -> <Self::DualSpace as VectorSpace>::PrincipalV; } /// Automatically implemented trait for reflexive spaces pub trait Reflexive<F: Num = f64>: HasDual<F> where - Self::DualSpace: HasDual<F, DualSpace = Self::OwnedSpace>, + Self::DualSpace: HasDual<F, DualSpace = Self::Principal>, { } impl<F: Num, X: HasDual<F>> Reflexive<F> for X where - X::DualSpace: HasDual<F, DualSpace = Self::OwnedSpace> + X::DualSpace: HasDual<F, DualSpace = Self::Principal> { }
--- a/src/sets.rs Wed Sep 03 09:52:30 2025 -0500 +++ b/src/sets.rs Wed Sep 03 10:08:28 2025 -0500 @@ -51,8 +51,8 @@ impl<U,Idx> Set<U> for $range<Idx> where U : Space<Decomp=BasicDecomposition>, - U::OwnedSpace : PartialOrd<Idx>, - Idx : PartialOrd + PartialOrd<U::OwnedSpace>, + U::Principal : PartialOrd<Idx>, + Idx : PartialOrd + PartialOrd<U::Principal>, { #[inline] fn contains<I : Instance<U>>(&self, item : I) -> bool {