Skip to main content

RiemannianObjective

Trait RiemannianObjective 

Source
pub trait RiemannianObjective {
    // Required method
    fn value_gradient(
        &mut self,
        point: ArrayView1<'_, f64>,
    ) -> GeometryResult<(f64, Array1<f64>)>;

    // Provided method
    fn hessian_vector_product(
        &mut self,
        point: ArrayView1<'_, f64>,
        tangent: ArrayView1<'_, f64>,
    ) -> GeometryResult<Option<Array1<f64>>> { ... }
}

Required Methods§

Source

fn value_gradient( &mut self, point: ArrayView1<'_, f64>, ) -> GeometryResult<(f64, Array1<f64>)>

Provided Methods§

Source

fn hessian_vector_product( &mut self, point: ArrayView1<'_, f64>, tangent: ArrayView1<'_, f64>, ) -> GeometryResult<Option<Array1<f64>>>

Riemannian Hessian–vector product H(x)·v for a tangent direction v at point, returned in the same ambient/tangent coordinates as the gradient.

This is what upgrades the trust-region subproblem from a Cauchy-point step (the exact minimizer of the linear model along the steepest descent direction) to a Steihaug truncated-CG step that exploits real curvature. An objective that exposes no second-order information returns None (the default), and the trust region transparently falls back to the Cauchy point — never to plain clipped steepest descent, which has no model, no predicted/actual reduction ratio, and no accept/reject.

The Riemannian-Hessian quadratic model the trust region builds from this product is a valid second-order model of f only along a (≥)second-order retraction (the exponential map, or any retraction with RiemannianManifold::retraction_is_second_order == true). On a manifold whose retract is only FIRST-order (e.g. the Stiefel/Grassmann QR retraction) the second derivative of the pullback f∘R_x is not the Riemannian Hessian, so the trust region ignores this curvature and uses the first-order-correct Cauchy model instead (issue #956).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§