pub struct BootstrapConfig {
pub tolerance: f64,
pub max_iter: u32,
pub bracket: f64,
pub iterative: bool,
pub iter_max: u32,
pub iter_tol: f64,
}Expand description
Configuration for Bootstrap.
The defaults match the values documented in WORKING.md §3.10:
tolerance = 1e-12, max_iter = 100, bracket = 0.5, iterative = true,
iter_max = 8, iter_tol = 1e-14.
§Examples
use regit_curves::bootstrap::BootstrapConfig;
let cfg = BootstrapConfig::default();
assert!((cfg.tolerance - 1e-12).abs() < 1e-18);
assert_eq!(cfg.max_iter, 100);
assert!((cfg.bracket - 0.5).abs() < 1e-15);
assert!(cfg.iterative);
assert_eq!(cfg.iter_max, 8);
assert!((cfg.iter_tol - 1e-14).abs() < 1e-20);Fields§
§tolerance: f64Per-leg residual tolerance handed to Brent as ftol.
max_iter: u32Per-leg iteration cap handed to Brent as max_iter.
bracket: f64Initial half-width of the discount-factor bracket. The bracket is
[D_guess * exp(-bracket), D_guess * exp(+bracket)] and is widened on
failure by doubling up to five times.
iterative: boolRun the outer iteration for non-local interpolation methods. Has no effect for local methods (linear, log-linear, linear-in-zero, piecewise-constant forward, monotone cubic, Steffen).
iter_max: u32Outer-iteration cap.
iter_tol: f64Outer-iteration convergence tolerance on the maximum nodal change
max_i |D_i^{new} - D_i^{old}|.
Trait Implementations§
Source§impl Clone for BootstrapConfig
impl Clone for BootstrapConfig
Source§fn clone(&self) -> BootstrapConfig
fn clone(&self) -> BootstrapConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more