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,
impl<ObjFn> Arc<ObjFn>where
ObjFn: SecondOrderObjective,
Sourcepub fn new(x0: Array1<f64>, obj_fn: ObjFn) -> Self
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.
Sourcepub fn with_tolerance(self, tolerance: Tolerance) -> Self
pub fn with_tolerance(self, tolerance: Tolerance) -> Self
Sets the convergence tolerance on projected gradient norm (default: 1e-5).
Sourcepub fn with_max_iterations(self, max_iterations: MaxIterations) -> Self
pub fn with_max_iterations(self, max_iterations: MaxIterations) -> Self
Sets the maximum number of iterations (default: 100).
pub fn with_fd_hessian_step(self, fd_hessian_step: f64) -> Self
Sourcepub fn with_bounds(self, bounds: Bounds) -> Self
pub fn with_bounds(self, bounds: Bounds) -> Self
Provides simple box bounds for each coordinate (lower <= x <= upper).
pub fn with_profile(self, profile: Profile) -> Self
Sourcepub fn with_hessian_fallback_policy(self, policy: HessianFallbackPolicy) -> Self
pub fn with_hessian_fallback_policy(self, policy: HessianFallbackPolicy) -> Self
See NewtonTrustRegion::with_hessian_fallback_policy.
Sourcepub fn with_fallback_policy(self, policy: FallbackPolicy) -> Self
pub fn with_fallback_policy(self, policy: FallbackPolicy) -> Self
See NewtonTrustRegion::with_fallback_policy.
Sourcepub fn with_initial_sample(
self,
x0: Array1<f64>,
sample: SecondOrderSample,
) -> Self
pub fn with_initial_sample( self, x0: Array1<f64>, sample: SecondOrderSample, ) -> Self
See NewtonTrustRegion::with_initial_sample.
Sourcepub fn with_initial_regularization(self, sigma: f64) -> Self
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.
Sourcepub fn with_min_regularization(self, sigma: f64) -> Self
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.
Sourcepub fn with_max_regularization(self, sigma: f64) -> Self
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.
Sourcepub fn with_gradient_tolerance(self, tol: GradientTolerance) -> Self
pub fn with_gradient_tolerance(self, tol: GradientTolerance) -> Self
See Bfgs::with_gradient_tolerance.
Sourcepub fn with_observer<O>(self, observer: O) -> Selfwhere
O: OptimizerObserver + 'static,
pub fn with_observer<O>(self, observer: O) -> Selfwhere
O: OptimizerObserver + 'static,
See Bfgs::with_observer.
Sourcepub fn run(&mut self) -> Result<Solution, ArcError>
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.
Sourcepub fn run_report(&mut self) -> OptimizationReport
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.