24#ifndef quantlib_forward_flat_interpolation_hpp
25#define quantlib_forward_flat_interpolation_hpp
33 template<
class I1,
class I2>
class ForwardFlatInterpolationImpl;
44 template <
class I1,
class I2>
47 impl_ = ext::shared_ptr<Interpolation::Impl>(
new
58 template <
class I1,
class I2>
60 const I2& yBegin)
const {
69 template <
class I1,
class I2>
80 for (
Size i=1; i<
n_; i++) {
Forward-flat interpolation factory and traits.
static const Size requiredPoints
Interpolation interpolate(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin) const
Forward-flat interpolation between discrete points.
ForwardFlatInterpolation(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin)
basic template implementation
Size locate(Real x) const
templateImpl(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const int requiredPoints=2)
base class for 1-D interpolations.
ext::shared_ptr< Impl > impl_
Real value(Real x) const override
Real derivative(Real) const override
Real secondDerivative(Real) const override
std::vector< Real > primitive_
Real primitive(Real x) const override
ForwardFlatInterpolationImpl(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin)
std::size_t Size
size of a container
base class for 1-D interpolations