Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LogQuadraticInterpolation Class Reference

log-quadratic interpolation between discrete points More...

#include <qle/math/logquadraticinterpolation.hpp>

+ Inheritance diagram for LogQuadraticInterpolation:
+ Collaboration diagram for LogQuadraticInterpolation:

Public Member Functions

template<class I1 , class I2 >
 LogQuadraticInterpolation (const I1 &xBegin, const I1 &xEnd, const I2 &yBegin, Real x_mul=1, Real x_offset=0, Real y_mul=1, Real y_offset=0, Size skip=0)
 
template<class I1 , class I2 >
std::vector< Real > lambdas () const
 

Detailed Description

log-quadratic interpolation between discrete points

Warning:
See the Interpolation class for information about the required lifetime of the underlying data.

Definition at line 40 of file logquadraticinterpolation.hpp.

Constructor & Destructor Documentation

◆ LogQuadraticInterpolation()

LogQuadraticInterpolation ( const I1 &  xBegin,
const I1 &  xEnd,
const I2 &  yBegin,
Real  x_mul = 1,
Real  x_offset = 0,
Real  y_mul = 1,
Real  y_offset = 0,
Size  skip = 0 
)
Precondition
the \( x \) values must be sorted.

Definition at line 44 of file logquadraticinterpolation.hpp.

48 {
49 impl_ = ext::shared_ptr<Interpolation::Impl>(new
51 xBegin, xEnd, yBegin,
52 Quadratic(x_mul, x_offset, y_mul, y_offset, skip)));
53 impl_->update();
54 }

Member Function Documentation

◆ lambdas()

std::vector< Real > lambdas ( ) const

Definition at line 56 of file logquadraticinterpolation.hpp.

56 {
58 Impl;
59 ext::shared_ptr<Impl> p =
60 ext::dynamic_pointer_cast<Impl>(impl_);
61 QL_REQUIRE(p, "unable to cast impl to "
62 "LogInterpolationImpl<I1,I2,Quadratic>");
63
64 ext::shared_ptr<QuadraticInterpolation> p2 =
65 ext::dynamic_pointer_cast<QuadraticInterpolation>(
66 p->interpolation());
67 QL_REQUIRE(p2, "unable to cast interpolation to "
68 "QuadraticInterpolation");
69
70 return p2->lambdas<I1,I2>();
71 }
+ Here is the caller graph for this function: