25template <
typename T =
double>
45 std::vector<T>
const& supporting_points,
46 std::vector<double>
const& values_at_supp_pnts)
53 "Inconsistent data given to PiecewiseConstantInterpolation, "
54 "number of given supporting points is {}, number of given "
60 ERR(
"PiecewiseConstantInterpolation: passed empty vector.");
76 double value(
double const pnt_to_interpolate)
const
92 auto const interval_idx = std::distance(
supp_pnts_.begin(), it) - 1;
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
std::vector< T > const & supp_pnts_
std::vector< double > const & values_at_supp_pnts_
double value(double const pnt_to_interpolate) const
Calculates the interpolation value.
PiecewiseConstantInterpolation(std::vector< T > const &supporting_points, std::vector< double > const &values_at_supp_pnts)