|
ampsci
High-precision calculations for one- and two-valence atomic systems
|
1D interpolation using GSL splines.
Wraps the GSL interpolation library (https://www.gnu.org/software/gsl/doc/html/interp.html). Provides a stateful Interp class and a convenience interpolate() function. Several interpolation methods are available via Method. Does not extrapolate: values outside [xmin, xmax] are returned as zero.
Classes | |
| class | Interp |
| Stateful 1D interpolation object using GSL. More... | |
Enumerations | |
| enum class | Method { linear , polynomial , cspline , cspline_periodic , akima , akima_periodic , steffen } |
| Interpolation method. More... | |
Functions | |
| std::vector< double > | interpolate (const std::vector< double > &x_in, const std::vector< double > &y_in, const std::vector< double > &x_out, Method method=Method::cspline) |
| Convenience wrapper: interpolates y_in(x_in) and evaluates at x_out. | |
|
strong |
Interpolation method.
See https://www.gnu.org/software/gsl/doc/html/interp.html for full details.
|
inline |
Convenience wrapper: interpolates y_in(x_in) and evaluates at x_out.
| x_in | Input x values (strictly increasing). |
| y_in | Input y values; must satisfy y_in.size() == x_in.size(). |
| x_out | Points at which to evaluate the interpolant. |
| method | Interpolation method (default: cspline). |