|
const QuantLib::ext::shared_ptr< Interpolation > | i_ |
|
Definition at line 42 of file flatextrapolation.hpp.
◆ FlatExtrapolationImpl()
◆ update()
◆ xMin()
◆ xMax()
◆ xValues()
std::vector< Real > xValues |
( |
| ) |
const |
|
override |
◆ yValues()
std::vector< Real > yValues |
( |
| ) |
const |
|
override |
◆ isInRange()
bool isInRange |
( |
Real |
x | ) |
const |
|
override |
◆ value()
Real value |
( |
Real |
x | ) |
const |
|
override |
Definition at line 52 of file flatextrapolation.hpp.
52 {
53 Real tmp = std::max(std::min(x,
i_->xMax()),
i_->xMin());
54 return i_->operator()(tmp);
55 }
◆ primitive()
Real primitive |
( |
Real |
x | ) |
const |
|
override |
Definition at line 56 of file flatextrapolation.hpp.
56 {
57 if (x >=
i_->xMin() && x <= i_->
xMax()) {
58 return i_->primitive(x);
59 }
61 return i_->primitive(
i_->xMin()) - (
i_->xMin() - x);
62 } else {
63 return i_->primitive(
i_->xMax()) + (x -
i_->xMax());
64 }
65 }
◆ derivative()
Real derivative |
( |
Real |
x | ) |
const |
|
override |
Definition at line 66 of file flatextrapolation.hpp.
66 {
67 if (x >
i_->xMin() && x < i_->
xMax()) {
68 return i_->derivative(x);
69 } else {
70
71
72 return 0.0;
73 }
74 }
◆ secondDerivative()
Real secondDerivative |
( |
Real |
x | ) |
const |
|
override |
Definition at line 75 of file flatextrapolation.hpp.
75 {
76 if (x >
i_->xMin() && x < i_->
xMax()) {
77 return i_->secondDerivative(x);
78 } else {
79
80
81 return 0.0;
82 }
83 }
◆ i_
const QuantLib::ext::shared_ptr<Interpolation> i_ |
|
private |