pub enum CalibrationError {
EmptyQuotes,
DidNotConverge {
iterations: usize,
residual: f64,
},
AllWeightsZero,
InsufficientEffectiveQuotes {
usable: usize,
distinct: usize,
need: usize,
},
InsufficientThetaLevels {
got: usize,
need: usize,
},
InvalidConfig {
field: &'static str,
value: f64,
},
Infeasible {
condition: &'static str,
margin: f64,
},
Param(ParamError),
}Expand description
Error returned when a calibrator cannot produce a usable fit.
Covers insufficient data, non-convergence of the outer optimiser, and any parameter error surfaced while assembling the calibrated slice.
§Examples
use regit_svi::error::CalibrationError;
let err = CalibrationError::InsufficientEffectiveQuotes { usable: 2, distinct: 2, need: 5 };
let msg = format!("{err}");
assert!(msg.contains("2"));
assert!(msg.contains("5"));Variants§
EmptyQuotes
The supplied quote set is empty.
DidNotConverge
The outer optimiser reached its iteration cap without converging.
AllWeightsZero
All fitting weights are zero, so the objective is identically zero.
InsufficientEffectiveQuotes
Too few usable or sufficiently distinct positive-weight observations.
Fields
InsufficientThetaLevels
Too few distinct positive ATM-variance levels identify the requested surface family.
Fields
InvalidConfig
A calibration control lies outside its supported domain.
Infeasible
A constrained search ended without a model satisfying a hard condition.
Fields
Param(ParamError)
A parameter error surfaced while assembling the calibrated slice.
Trait Implementations§
Source§impl Clone for CalibrationError
impl Clone for CalibrationError
Source§fn clone(&self) -> CalibrationError
fn clone(&self) -> CalibrationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CalibrationError
Source§impl Debug for CalibrationError
impl Debug for CalibrationError
Source§impl Display for CalibrationError
impl Display for CalibrationError
Source§impl Error for CalibrationError
impl Error for CalibrationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ParamError> for CalibrationError
impl From<ParamError> for CalibrationError
Source§fn from(e: ParamError) -> Self
fn from(e: ParamError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CalibrationError
impl PartialEq for CalibrationError
impl StructuralPartialEq for CalibrationError
Auto Trait Implementations§
impl Freeze for CalibrationError
impl RefUnwindSafe for CalibrationError
impl Send for CalibrationError
impl Sync for CalibrationError
impl Unpin for CalibrationError
impl UnsafeUnpin for CalibrationError
impl UnwindSafe for CalibrationError
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
Mutably borrows from an owned value. Read more