It seems that domain() is not exposed in pchip (and maybe some other interpolators).
Adding :
std::pair<Real, Real> domain() const
{
return impl_->domain();
}
to the class would allow to perform soft checks of the domain and avoid throwing an exception when abscissa x is out of bounds
I tested by adding the above snippet to the class with no issues, while using an underlying
boost::math::interpolators::pchip<boost::circular_buffer> implementation.
unless that is by design or the consequence of some other issue, that would be really useful.