25#ifndef quantlib_bilinear_interpolation_hpp
26#define quantlib_bilinear_interpolation_hpp
34 template <
class I1,
class I2,
class M>
39 const I2& yBegin,
const I2& yEnd,
60 return (1.0-
t)*(1.0-u)*z1 +
t*(1.0-u)*z2
61 + (1.0-
t)*u*z3 +
t*u*z4;
75 template <
class I1,
class I2,
class M>
77 const I2& yBegin,
const I2& yEnd,
79 impl_ = ext::shared_ptr<Interpolation2D::Impl>(
89 template <
class I1,
class I2,
class M>
91 const I2& yBegin,
const I2& yEnd,
bilinear-interpolation factory
Interpolation2D interpolate(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &z) const
bilinear interpolation between discrete points
BilinearInterpolation(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_
BilinearInterpolationImpl(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
Real value(Real x, Real y) const override
void calculate() override
std::size_t Size
size of a container
abstract base classes for 2-D interpolations