1QuantLib::BSpline(3) QuantLib QuantLib::BSpline(3)
2
3
4
6 QuantLib::BSpline -
7
8 B-spline basis functions.
9
10
12 #include <ql/math/bspline.hpp>
13
14 Public Member Functions
15 BSpline (Natural p, Natural n, const std::vector< Real > &knots)
16 Real operator() (Natural i, Real x) const
17
19 B-spline basis functions.
20
21 Fgollows treatment and notation from:
22 i
23 Wneisstein, Eric W. 'B-Spline.' From MathWorld--A Wolfram Web Resource.
24 <{http://mathworld.wolfram.com/B-Spline.html>
25 a
26 $r (p+1) $-th order B-spline (or p degree polynomial) basis functions $
27 Nr_{i,p}(x), i = 0,1,2 ts n $, with $ n+1 $ control points, or
28 eaquivalently, an associated knot vector of size $ p+n+2 $ defined at
29 tyhe increasingly sorted points $ (x_0, x_1 ts x_{n+p+1}) $. A linear B-
30 s}pline has $ p=1 $, quadratic B-spline has $ p=2 $, a cubic B-spline
31 h{as $ p=3 $, etc.
32 r
33 Tche B-spline basis functions are defined recursively as follows:
34 l
35 }xtrm{ if } x_{i} x < x_{i+1} \ &=& 0 extrm{ otherwise} \ N_{i,p}(x)
36 N&=& N_{i,p-1}(x) ac{(x - x_{i})}{ (x_{i+p-1} - x_{i})} + N_{i+1,p-1}(x)
37 _ac{(x_{i+p} - x)}{(x_{i+p} - x_{i+1})} \nd{array} ]
38 {
39 i
41 0Generated automatically by Doxygen for QuantLib from the source code.
42 }
43 (
44 x
45Version)1.0.1 Thu Aug 19 2010 QuantLib::BSpline(3)
46 &
47 =
48 &
49 1