45 <<
"size: X=" <<
x.
size() <<
", Y=" <<
y.
size();
68 if (
x[
i] ==
x[
i - 1] &&
y[
i] ==
y[
i - 1]) {
71 if (
x[
i] <
x[
i - 1]) {
73 <<
"but found " <<
x[
i] <<
" after " <<
x[
i - 1];
104 if (pair.first ==
x.
back() && pair.second ==
y.
back()) {
107 if (pair.first <
x.
back()) {
109 <<
"but found " << pair.first <<
" after " <<
x.
back();
112 x.emplace_back(pair.first);
113 y.emplace_back(pair.second);
static Elements::Logging logger
Logger.
static Logging getLogger(const std::string &name="")
This module provides an interface for accessing two dimensional datasets (pairs of (X,...
ELEMENTS_API std::unique_ptr< Function > interpolate(const std::vector< double > &x, const std::vector< double > &y, InterpolationType type, bool extrapolate=false)
ELEMENTS_API double simple_interpolation(double x, const std::vector< double > &xp, const std::vector< double > &yp, bool extrapolate=false)
std::unique_ptr< Function > splineInterpolation(const std::vector< double > &x, const std::vector< double > &y, bool extrapolate)
Performs cubic spline interpolation for the given set of data points.
InterpolationType
Enumeration of the different supported interpolation types.
std::array< std::vector< double >, N > Coordinates
Used to pass the grid coordinates to interpn. Internally will make a copy of the required values.
std::unique_ptr< Function > linearInterpolation(const std::vector< double > &x, const std::vector< double > &y, bool extrapolate)
Performs linear interpolation for the given set of data points.