pub struct TrustRegionConfig {
pub ftol: f64,
pub xtol: f64,
pub gtol: f64,
pub max_nfev: usize,
pub delta0: f64,
pub max_delta: f64,
pub eta: f64,
}Expand description
Tuning for a single Δ-radius trust-region solve.
Fields§
§ftol: f64Relative cost-decrease tolerance.
xtol: f64Relative step-size tolerance.
gtol: f64Gradient infinity-norm tolerance.
max_nfev: usizeMaximum residual evaluations.
delta0: f64Initial trust radius Δ (scaled units); ≤ 0 ⇒ a problem-derived default.
max_delta: f64Hard upper bound on Δ.
eta: f64Acceptance threshold: accept the step when ρ > eta.
Must be < 0.25 (debug-asserted in minimize_tr). The Δ update
shrinks the radius only when ρ < 0.25, so an eta ≥ 0.25 opens a band
ρ ∈ [0.25, eta] in which a step is rejected while Δ is left unchanged
— the accept/reject subloop then re-solves the identical subproblem at
the identical radius until the evaluation budget runs out.
The debug_assert! above does not run in release builds, so this
crate does not itself enforce the bound outside cfg(debug_assertions)
— callers must validate eta before constructing this config.
spectrafit-solver::dispatch does, rejecting eta >= 0.25 (or
non-finite / negative eta) with SolverError::InvalidEta before it
reaches this driver.
Trait Implementations§
Source§impl Clone for TrustRegionConfig
impl Clone for TrustRegionConfig
Source§fn clone(&self) -> TrustRegionConfig
fn clone(&self) -> TrustRegionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TrustRegionConfig
Source§impl Debug for TrustRegionConfig
impl Debug for TrustRegionConfig
Auto Trait Implementations§
impl Freeze for TrustRegionConfig
impl RefUnwindSafe for TrustRegionConfig
impl Send for TrustRegionConfig
impl Sync for TrustRegionConfig
impl Unpin for TrustRegionConfig
impl UnsafeUnpin for TrustRegionConfig
impl UnwindSafe for TrustRegionConfig
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,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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 more