BSpline (3) - Linux Manuals

BSpline: B-spline basis functions.

NAME

QuantLib::BSpline - B-spline basis functions.

SYNOPSIS


#include <ql/math/bspline.hpp>

Public Member Functions


BSpline (Natural p, Natural n, const std::vector< Real > &knots)

Real operator() (Natural i, Real x) const

Detailed Description

B-spline basis functions.

Follows treatment and notation from:

Weisstein, Eric W. 'B-Spline.' From MathWorld--A Wolfram Web Resource. <http://mathworld.wolfram.com/B-Spline.html>

$ (p+1) $-th order B-spline (or p degree polynomial) basis functions $ N_{i,p}(x), i = 0,1,2


knot vector of size $ p+n+2 $ defined at the increasingly sorted points $ (x_0, x_1
ratic B-spline has $ p=2 $, a cubic B-spline has $ p=3 $, etc.

The B-spline basis functions are defined recursively as follows:

[ xtrm{ if } x_{i}


xtrm{ otherwise} \ N_{i,p}(x) &=& N_{i,p-1}(x) ac{(x - x_{i})}{ (x_{i+p-1} - x_{i})} + N_{i+1,p-1}(x) ac{(x_{i+p} - x)}{(x_{i+p} - x_{i+1})} \nd{array} ]

Author

Generated automatically by Doxygen for QuantLib from the source code.