24#ifndef quantlib_backwardflatlinear_interpolation_hpp
25#define quantlib_backwardflatlinear_interpolation_hpp
33 template <
class I1,
class I2,
class M>
38 const I2& yBegin,
const I2& yEnd,
55 if(x == this->xBegin_[i]) {
61 z2 = this->
zData_[j+1][i+1];
68 return (1.0-u)*z1 + u*z2;
80 template <
class I1,
class I2,
class M>
82 const I2& yBegin,
const I2& yEnd,
84 impl_ = ext::shared_ptr<Interpolation2D::Impl>(
93 template <
class I1,
class I2,
class M>
95 const I2& yBegin,
const I2& yEnd,
Interpolation2D interpolate(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &z) const
BackwardflatLinearInterpolation(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
basic template implementation
Size locateX(Real x) const override
const Matrix & zData() const override
Size locateY(Real y) const override
templateImpl(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
base class for 2-D interpolations.
const Matrix & zData() const
ext::shared_ptr< Impl > impl_
Real value(Real x, Real y) const override
void calculate() override
BackwardflatLinearInterpolationImpl(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
std::size_t Size
size of a container
abstract base classes for 2-D interpolations