26#ifndef quantlib_polynomial2D_spline_hpp
27#define quantlib_polynomial2D_spline_hpp
36 template <
class I1,
class I2,
class M>
41 const I2& yBegin,
const I2& yEnd,
const M&
zData)
49 "size mismatch of the interpolation data");
52 for (
Size i=0; i<(this->
zData_.columns()); ++i)
55 this->
zData_.column_begin(i)));
63 QL_REQUIRE(section.size() == this->xEnd_ - this->xBegin_,
64 "size mismatch of the interpolation data");
72 return spline(x,
true);
84 template <
class I1,
class I2,
class M>
86 const I2& yBegin,
const I2& yEnd,
88 impl_ = ext::shared_ptr<Interpolation2D::Impl>(
90 yBegin, yEnd,
zData));
97 template <
class I1,
class I2,
class M>
99 const I2& yBegin,
const I2& yEnd,
Cubic interpolation between discrete points.
@ SecondDerivative
Match value of second derivative at end.
basic template implementation
const Matrix & zData() 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_
polynomial2D-spline interpolation between discrete points
Polynomial2DSpline(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
polynomial2D-spline-interpolation factory
Interpolation2D interpolate(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &z) const
Polynomial2DSplineImpl(const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, const I2 &yEnd, const M &zData)
std::vector< Interpolation > polynomials_
Real value(Real x, Real y) const
cubic interpolation between discrete points
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
abstract base classes for 2-D interpolations