1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Errors owned by the math layer.
//!
//! Each failure here is raised by a generic math type: a curve, a surface, an
//! interpolation or a statistic extracted from them. Errors raised by core
//! types (`DecimalError`, `PositionError`, …) stay in `optionstratlib-core`,
//! and the variants below that wrap them carry those types unchanged.
//!
//! # Canonical paths (#550)
//!
//! Every error type is exported flat from this module, for example
//! `optionstratlib_math::error::CurveError`. The file module `curves` is
//! private: it held nothing the flat paths do not, and was public only
//! because 0.21 exposed it.
//!
//! ```rust
//! use optionstratlib_math::error::{CurveError, CurvesResult};
//! ```
//!
//! ```compile_fail,E0603
//! use optionstratlib_math::error::curves::CurveError;
//! ```
//!
//! ```compile_fail,E0603
//! use optionstratlib_math::error::curves::CurvesResult;
//! ```
/// ### Curve Errors (`CurveError`)
/// Handles:
/// * Curve construction from points or parametric functions
/// * Point lookup and segment search
/// * Curve arithmetic and merging
/// * Metric extraction over a curve
/// ### Interpolation Errors (`InterpolationError`)
/// Manages:
/// * Data point validation
/// * Interpolation method errors
/// * Boundary conditions
/// * Mathematical approximation issues
/// ### Metrics Errors (`MetricsError`)
/// Statistical, shape, range and trend metrics extracted from curves and
/// surfaces.
/// ### Surface Errors (`SurfaceError`)
/// Covers:
/// * Surface construction failures
/// * Dimensional and data completeness errors
/// * Surface arithmetic and interpolation
pub use ;
pub use InterpolationError;
pub use MetricsError;
pub use SurfaceError;