Skip to main content

Arc

Struct Arc 

Source
pub struct Arc<ObjFn> { /* private fields */ }
Expand description

A configurable Adaptive Regularization with Cubics (ARC) solver.

Implementations§

Source§

impl<ObjFn> Arc<ObjFn>
where ObjFn: SecondOrderObjective,

Source

pub fn new(x0: Array1<f64>, obj_fn: ObjFn) -> Self

Creates a new ARC solver.

§Arguments
  • x0 - The initial guess for the minimum.
  • obj_fn - Second-order objective.
Source

pub fn with_tolerance(self, tolerance: Tolerance) -> Self

Sets the convergence tolerance on projected gradient norm (default: 1e-5).

Source

pub fn with_max_iterations(self, max_iterations: MaxIterations) -> Self

Sets the maximum number of iterations (default: 100).

Source

pub fn with_fd_hessian_step(self, fd_hessian_step: f64) -> Self

Source

pub fn with_bounds(self, bounds: Bounds) -> Self

Provides simple box bounds for each coordinate (lower <= x <= upper).

Source

pub fn with_profile(self, profile: Profile) -> Self

Source

pub fn with_hessian_fallback_policy(self, policy: HessianFallbackPolicy) -> Self

See NewtonTrustRegion::with_hessian_fallback_policy.

Source

pub fn with_fallback_policy(self, policy: FallbackPolicy) -> Self

See NewtonTrustRegion::with_fallback_policy.

Source

pub fn with_initial_sample( self, x0: Array1<f64>, sample: SecondOrderSample, ) -> Self

See NewtonTrustRegion::with_initial_sample.

Source

pub fn with_initial_regularization(self, sigma: f64) -> Self

Set the initial cubic-regularization parameter sigma (the ARC analogue of a trust radius). Default is 1.0. Warm-start with OptimizationDiagnostics.final_regularization from a previous run when retrying with a larger budget.

Source

pub fn with_min_regularization(self, sigma: f64) -> Self

Set the floor for sigma (default: 1e-10). The solver does not shrink below this; raising it forbids the regularization from approaching pure Newton on benign iterations.

Source

pub fn with_max_regularization(self, sigma: f64) -> Self

Set the ceiling for sigma (default: 1e12). The solver does not grow beyond this on rejection; lowering it caps how aggressively the cubic term can dominate the model.

Source

pub fn with_gradient_tolerance(self, tol: GradientTolerance) -> Self

See Bfgs::with_gradient_tolerance.

Source

pub fn with_observer<O>(self, observer: O) -> Self
where O: OptimizerObserver + 'static,

See Bfgs::with_observer.

Source

pub fn run(&mut self) -> Result<Solution, ArcError>

Executes ARC optimization.

This implementation follows the practical ARC template in Euclidean spaces. Under standard assumptions (for example lower bounded objective and Lipschitz-continuous Hessian), ARC theory gives an O(eps^-1.5) first-order iteration bound; this API does not encode assumptions, but mirrors that algorithmic structure.

Source

pub fn run_report(&mut self) -> OptimizationReport

Structured report variant of run(). See Bfgs::run_report.

Populates OptimizationDiagnostics.final_regularization from the solver’s last observed cubic-regularization parameter sigma, which is the ARC analogue of a trust radius for warm-starting a follow-up call.

Auto Trait Implementations§

§

impl<ObjFn> Freeze for Arc<ObjFn>
where ObjFn: Freeze,

§

impl<ObjFn> !RefUnwindSafe for Arc<ObjFn>

§

impl<ObjFn> Send for Arc<ObjFn>
where ObjFn: Send,

§

impl<ObjFn> !Sync for Arc<ObjFn>

§

impl<ObjFn> Unpin for Arc<ObjFn>
where ObjFn: Unpin,

§

impl<ObjFn> UnsafeUnpin for Arc<ObjFn>
where ObjFn: UnsafeUnpin,

§

impl<ObjFn> !UnwindSafe for Arc<ObjFn>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.