Simpatico
v1.10
|
A cardinal B-spline basis function.
A cardinal B-Spline of order m or degree k = m - 1 is a piecewise continuous polynomial of degree k defined over the domain [0, k+1]. Such a function is defined by k different polynomials, each of which has a domain [i, i+1] for an integer i with 0 <= i <=k. For k > 0, the function and k-1 derivatives are continuous.
A CardinalBSpline object of degree k has k Polynomial<double> objects, indexed by an integer 0 <= i <= k, each of which defines the polynomial with a domain [i,i+1].
If object b is a CardinalBSpline of degree k, then:
Definition at line 42 of file CardinalBSpline.h.
#include <CardinalBSpline.h>
Public Member Functions | |
Polynomial< double > const & | operator[] (int i) const |
Get Polynomial<double> object for domain [i,i+1]. More... | |
double | operator() (double x) const |
Compute the value of the spline basis function. More... | |
int | degree () const |
Return degree of basis function (i.e., degree of polynomials). More... | |
Constructor and Destructor | |
CardinalBSpline (int degree, bool verbose=false) | |
Construct a spline basis of specified degree. More... | |
~CardinalBSpline () | |
Destructor. More... | |
Util::CardinalBSpline::CardinalBSpline | ( | int | degree, |
bool | verbose = false |
||
) |
Construct a spline basis of specified degree.
degree | degree of the function (i.e., degree of polynomials) |
verbose | if true, write verbose report to std::cout |
Definition at line 17 of file CardinalBSpline.cpp.
References Util::DArray< Data >::allocate(), and UTIL_CHECK.
Util::CardinalBSpline::~CardinalBSpline | ( | ) |
Destructor.
Definition at line 125 of file CardinalBSpline.cpp.
|
inline |
Get Polynomial<double> object for domain [i,i+1].
If b is a CardinalBSpline, b[i] returns the Polynomial<double> object (the polynomial with double precision floating point coefficients) associated with the domain [i,i+1].
i | integer index in range 0 <= i <= degree. |
Definition at line 119 of file CardinalBSpline.h.
|
inline |
Compute the value of the spline basis function.
If b is a CardinalBSpline, b(x) returns the value of the spline function for specified floating point argument x, giving a nonzero value only for 0 < x < degree + 1.
x | argument of spline basis function |
Definition at line 126 of file CardinalBSpline.h.
References UTIL_ASSERT.
|
inline |
Return degree of basis function (i.e., degree of polynomials).
Definition at line 139 of file CardinalBSpline.h.