pub struct Options {Show 18 fields
pub max_iter: usize,
pub max_fev: Option<usize>,
pub ftol: f64,
pub xtol: f64,
pub gtol: f64,
pub initial_step: Option<f64>,
pub maxstep: Option<f64>,
pub finite_diff: bool,
pub eps: f64,
pub trust_radius: Option<f64>,
pub max_trust_radius: Option<f64>,
pub min_trust_radius: Option<f64>,
pub trust_tol: Option<f64>,
pub trust_max_iter: Option<usize>,
pub trust_eta: Option<f64>,
pub bounds: Option<Bounds>,
pub use_gpu: bool,
pub gpu_threshold_override: Option<usize>,
}Expand description
Options for optimization algorithms
Fields§
§max_iter: usizeMaximum number of iterations
max_fev: Option<usize>Maximum number of function evaluations
ftol: f64Function tolerance for convergence
xtol: f64Change tolerance for convergence
gtol: f64Gradient tolerance for convergence
initial_step: Option<f64>Initial step size
maxstep: Option<f64>Maximum step size for line search
finite_diff: boolWhether to use finite differences for gradient
eps: f64Finite difference step size
trust_radius: Option<f64>Initial trust-region radius for trust-region methods
max_trust_radius: Option<f64>Maximum trust-region radius for trust-region methods
min_trust_radius: Option<f64>Minimum trust-region radius for trust-region methods
trust_tol: Option<f64>Tolerance for the trust-region subproblem
trust_max_iter: Option<usize>Maximum iterations for trust-region subproblem
trust_eta: Option<f64>Threshold for accepting a step in the trust-region method
bounds: Option<Bounds>Bounds constraints for variables
use_gpu: boolEnable GPU acceleration in L-BFGS, Conjugate Gradient, and Newton-CG when
n_params >= threshold and a wgpu adapter is present. Per-method thresholds:
L-BFGS: 4096 (GPU_LBFGS_THRESHOLD), CG: 4096 (GPU_CG_THRESHOLD),
Newton-CG: 4096 (GPU_NEWTON_THRESHOLD).
Requires the gpu feature. Defaults to true (auto-detect). Set to false to force
the CPU path regardless of hardware.
gpu_threshold_override: Option<usize>Override the GPU threshold for testing purposes. When Some(n), GPU dispatch is
attempted if n_params >= n (and use_gpu is true and an adapter is present).
None uses the per-method default threshold (4096 for L-BFGS, CG, and Newton-CG).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
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.