1 #ifndef UTIL_CARDINAL_B_SPLINE_H 2 #define UTIL_CARDINAL_B_SPLINE_H 11 #include <util/containers/DArray.h> 12 #include <util/math/Polynomial.h> 13 #include <util/math/Rational.h> 120 {
return floatPolynomials_[i]; }
128 if (x <= 0.0)
return 0.0;
131 if (i > degree_)
return 0.0;
132 return floatPolynomials_[i](x);
A cardinal B-spline basis function.
~CardinalBSpline()
Destructor.
Polynomial< double > const & operator[](int i) const
Get Polynomial<double> object for domain [i,i+1].
File containing preprocessor macros for error handling.
CardinalBSpline(int degree, bool verbose=false)
Construct a spline basis of specified degree.
Utility classes for scientific computation.
double operator()(double x) const
Compute the value of the spline basis function.
Dynamically allocatable contiguous array template.
int degree() const
Return degree of basis function (i.e., degree of polynomials).
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.