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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// Represents the different types of interpolation methods supported in the library.
///
/// This enum defines the available interpolation techniques that can be used in various
/// mathematical modeling, data analysis, and visualization scenarios. Each interpolation
/// method has unique characteristics making it suitable for different applications.
///
/// # Variants
/// - **`Linear`**:
/// Performs linear interpolation. This method calculates interpolated values
/// by connecting two adjacent points on a line and using the slope between
/// them to determine new values.
///
/// - **`Cubic`**:
/// Utilizes cubic interpolation, which involves fitting a cubic polynomial
/// between data points to provide a smoother curve. This is commonly used for
/// precise curve fitting and smoothing applications.
///
/// - **`Spline`**:
/// Implements spline interpolation, typically involving piecewise polynomials
/// (e.g., cubic splines) that ensure smooth transitions between data points
/// while maintaining continuity of derivatives at the joins. Spline methods
/// are widely used in mathematical modeling and graphical applications.
///
/// - **`Bilinear`**:
/// A two-dimensional extension of linear interpolation. Commonly used in grid-based
/// data interpolation, bilinear interpolation calculates the value at a point within
/// a cell of a 2D grid based on the values at the vertices of the cell.
///
/// # Usage
/// This enumeration is typically used as part of a larger interpolation framework,
/// providing a way to select the desired interpolation method. Each variant corresponds
/// to a specific interpolation strategy, and implementations for these can be found in
/// their respective modules (e.g., `linear`, `cubic`, `spline`, `bilinear`).
///
/// # Integration
/// The `InterpolationType` enum is re-exported in the library's root module to make it
/// easily accessible as part of the public API. It works in conjunction with traits such as
/// `Interpolate`, allowing users to dynamically specify the desired interpolation type
/// when performing operations.
///
/// # Example Use Case
/// While the `InterpolationType` enum itself does not contain any methods or logic,
/// it serves as a configuration point for choosing the interpolation method to be used
/// in a context where multiple types of interpolation are supported.
///
/// # See Also
/// - [`crate::geometrics::LinearInterpolation`]: Implements linear interpolation.
/// - [`crate::geometrics::CubicInterpolation`]: Implements cubic interpolation.
/// - [`crate::geometrics::SplineInterpolation`]: Implements spline interpolation.
/// - [`crate::geometrics::BiLinearInterpolation`]: Implements bilinear interpolation.
///
/// This enum is part of a modular design, with each interpolation type defined in its own
/// module for clarity and separation of concerns.
///