|
| | BSpline (std::size_t n, std::size_t k, double x0, double xmax, KnotDistro kd=KnotDistro::logarithmic) |
| | Constructs basis of n splines of order k, defined over [0,xmax]. x0 is first non-zero knot. kd = { logarithmic, linear, loglinear }.
|
| |
|
BSpline & | operator= (const BSpline &)=delete |
| |
|
| BSpline (const BSpline &)=delete |
| |
| std::size_t | K () |
| | Order of the splines, K.
|
| |
| std::size_t | d () |
| | Degree of the splines, d:=K-1.
|
| |
| std::size_t | N () |
| | Number of splines, N.
|
| |
| std::size_t | find_i0 (double x) |
| | Returns the first nonzero spline index i0; Note that i runs [0,N). The last non-zero index is min(i0+K-1, N-1).
|
| |
| std::vector< double > | get (double x) |
| | Returns a std::vector of all splines {b0, b1, ..., b_N-1} evaluated at x.
|
| |
| std::pair< std::size_t, LinAlg::Matrix< double > > | get_nonzero (double x, std::size_t n_deriv) |
| | Returns a pair {i0, M}, where i0 is spline index of first non-zero spline, and M is a matrix of non-zero splines and their derivatives. M_ij contains the jth derivative of the spline b[i+i0] evaulated at x.
|
| |
|
void | print_knots () const |
| |
Calculates basis of N B-splines of order K (degree K-1), defined over range [0, xmax]. x0 is first non-zero ("internal") knot point.
N - K + 2 break-points "internal knots" placed between [x0,xmax]. By default: on a logarithmic scale May also be placed on a linear or log-linear scale If log-linear scale, b=(xmax/2) (see qip::loglinear_range) knots are the same as breakpoints, but the ends are repeated K times. Uses the GSL Bspline library, gsl/gsl_bspline.h https://www.gnu.org/software/gsl/doc/html/bspline.html See also: Bachau et al., Reports Prog. Phys. 64, 1815 (2001).