#include <algorithm>
#include <gsl/gsl_interp.h>
#include "arrays.h"
Go to the source code of this file.
Returns an array of interpolates of the array y0 for every value of x.
- Parameters
-
x0 | X-values for the discrete samples. |
y0 | Discrete samples |
x | Evaluation (interpolation) points. |
rArray interpolate_real |
( |
rArray const & |
x0, |
|
|
rArray const & |
y0, |
|
|
rArray const & |
x, |
|
|
const gsl_interp_type * |
interpolation |
|
) |
| |
|
inline |
Returns an array of interpolates of the array y0 for every value of x.
- Parameters
-
x0 | X-values for the discrete samples. |
y0 | Discrete samples |
x | Evaluation (interpolation) points. |
interpolation | Interpolation type.
- gsl_interp_linear : Linear interpolation. This interpolation method does not require any additional memory.
- gsl_interp_polynomial : Polynomial interpolation. This method should only be used for interpolating small numbers of points because polynomial interpolation introduces large oscillations, even for well-behaved datasets. The number of terms in the interpolating polynomial is equal to the number of points.
- gsl_interp_cspline : Cubic spline with natural boundary conditions. The resulting curve is piecewise cubic on each interval, with matching first and second derivatives at the supplied data-points. The second derivative is chosen to be zero at the first point and last point.
- gsl_interp_cspline_periodic : Cubic spline with periodic boundary conditions. The resulting curve is piecewise cubic on each interval, with matching first and second derivatives at the supplied data-points. The derivatives at the first and last points are also matched. Note that the last point in the data must have the same y-value as the first point, otherwise the resulting periodic interpolation will have a discontinuity at the boundary.
- gsl_interp_akima : Non-rounded Akima spline with natural boundary conditions. This method uses the non-rounded corner algorithm of Wodicka.
- gsl_interp_akima_periodic : Non-rounded Akima spline with periodic boundary conditions. This method uses the non-rounded corner algorithm of Wodicka.
|