8#ifndef model_InterpolantBase_cpp_
9#define model_InterpolantBase_cpp_
39 throw std::runtime_error(
"InterpolantBase: sortedData is empty.");
44 if(extrapolation.period<xMax()-xMin())
46 throw std::runtime_error(
"InterpolantBase: extrapolation.period < xMax-xMin.");
64 for(
int r=0;r<data.rows();++r)
66 const auto success(
temp.emplace(data(r,0),data(r,1)));
69 std::cout<<
"x="<<data(r,0)<<
", y="<<data(r,1)<<std::endl;
70 throw std::runtime_error(
"InterpolantBase::convertData found non-unique x values.");
80 for(
const auto& pair : data)
83 temp(
k,1)=pair.second;
91 return this->begin()->first;
96 return this->rbegin()->first;
Eigen::Matrix< double, Eigen::Dynamic, 2 > MatrixType
InterpolantBase(const MapType &data, const ExtrapolationMethod &extrap)
double f(const double &x) const
std::map< double, double > MapType
double operator()(const double &x) const
ExtrapolationMethod extrapolation
virtual ~InterpolantBase()
final point of the source segment t
function int_R syms a b c u real f
enum insertvertexresult success