pub struct RiemannianTrustRegion {
pub radius: f64,
pub max_radius: f64,
pub max_iter: usize,
pub grad_tol: f64,
}Fields§
§radius: f64Initial trust-region radius Δ₀.
max_radius: f64Hard cap Δmax on the radius across all iterations.
max_iter: usize§grad_tol: f64Implementations§
Source§impl RiemannianTrustRegion
impl RiemannianTrustRegion
Sourcepub fn minimize(
&self,
manifold: &dyn RiemannianManifold,
objective: &mut dyn RiemannianObjective,
initial: ArrayView1<'_, f64>,
) -> GeometryResult<Array1<f64>>
pub fn minimize( &self, manifold: &dyn RiemannianManifold, objective: &mut dyn RiemannianObjective, initial: ArrayView1<'_, f64>, ) -> GeometryResult<Array1<f64>>
A genuine Riemannian trust-region method.
At each iterate x we build the quadratic model in the tangent space
T_xM,
m(η) = f(x) + g_x(grad, η) + ½ g_x(η, Hη),where g_x(·,·) is the manifold metric inner product and H is the
Riemannian Hessian (accessed only through Hessian–vector products). The
step is the (approximate) solution of the trust-region subproblem
min_{η ∈ T_xM, ‖η‖_g ≤ Δ} m(η).When the objective supplies Hessian–vector products AND the manifold’s
retract is at least a second-order retraction
(RiemannianManifold::retraction_is_second_order) we solve the
subproblem with the Steihaug truncated-CG method (stopping at negative
curvature or the trust-region boundary). Otherwise — no curvature, or a
first-order retraction whose pullback second derivative is not the
Riemannian Hessian (issue #956) — we fall back to the Cauchy point: the
exact minimizer of the model along the steepest-descent direction within
the trust region (with curvature taken from the model where available,
and the boundary point of the decreasing linear model otherwise). The
linear term Df_x[η] is retraction-independent, so the Cauchy model
keeps ρ and the radius control valid along any retraction. Either way
this is a real model-based step — not clipped descent.
We then form the ratio of actual to predicted reduction
ρ = (f(x) − f(x⁺)) / (m(0) − m(η)),accept the step only when ρ > η₁, and adapt Δ: shrink on a poor ratio,
expand on an excellent ratio that reaches the boundary, otherwise hold.
Only accepted steps are retracted onto the manifold.
Trait Implementations§
Source§impl Clone for RiemannianTrustRegion
impl Clone for RiemannianTrustRegion
Source§fn clone(&self) -> RiemannianTrustRegion
fn clone(&self) -> RiemannianTrustRegion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RiemannianTrustRegion
impl Debug for RiemannianTrustRegion
Source§impl Default for RiemannianTrustRegion
impl Default for RiemannianTrustRegion
Source§impl PartialEq for RiemannianTrustRegion
impl PartialEq for RiemannianTrustRegion
Source§fn eq(&self, other: &RiemannianTrustRegion) -> bool
fn eq(&self, other: &RiemannianTrustRegion) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RiemannianTrustRegion
Auto Trait Implementations§
impl Freeze for RiemannianTrustRegion
impl RefUnwindSafe for RiemannianTrustRegion
impl Send for RiemannianTrustRegion
impl Sync for RiemannianTrustRegion
impl Unpin for RiemannianTrustRegion
impl UnsafeUnpin for RiemannianTrustRegion
impl UnwindSafe for RiemannianTrustRegion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.