pub enum CalibrationError {
TooFewQuotes {
got: usize,
need: usize,
},
EmptyQuotes,
DidNotConverge {
iterations: usize,
residual: f64,
},
AllWeightsZero,
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::errors::CalibrationError;
let err = CalibrationError::TooFewQuotes { got: 2, need: 5 };
let msg = format!("{err}");
assert!(msg.contains("2"));
assert!(msg.contains("5"));Variants§
TooFewQuotes
Fewer quotes were supplied than the model has free parameters.
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.
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 moreSource§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
Source§fn eq(&self, other: &CalibrationError) -> bool
fn eq(&self, other: &CalibrationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy 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