|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
utility macro for piecewise functions More...
Go to the source code of this file.
Macros | |
| #define | QL_PIECEWISE_FUNCTION(X, Y, x) |
utility macro for piecewise functions
Definition in file piecewisefunction.hpp.
| #define QL_PIECEWISE_FUNCTION | ( | X, | |
| Y, | |||
| x | |||
| ) |
This defines a piecewise constant function which is RCLL and takes the values Y[0], Y[1], ... Y[n] on the intervals (-\infty, X[0]), [ X[1], X[2] ), ... , [ X[n-1], \infty) Normally Y.size() should be X.size() + 1. If more values for Y are given, they are ignored. If less values are given the last given value is kept the same for the remaining intervals. If X.size() is 0 a constant function taking the value Y[0] is evaluated.
Definition at line 43 of file piecewisefunction.hpp.