[eigen] eigen based splines

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I created a fork with an initial implementation of Eigen based
B-Splines. It is located over here:

The splines have three template parameters; Scalar type, dimension and
(optional) degree. Manually defining the degree allows us to prevent
heap allocations.

Currently I have implemented the following functions (ReturnByValue
will be abbreviated as rbv):


/* ctor */
Spline::Spline(const Vec& knots, const Mat& ctrls)
template <int OtherDegree>
Spline::Spline(const Spline<Scalar, Dimension, OtherDegree>& spline)

/* const access */
const Vec& Spline::knots() const
const Mat& Spline::ctrls() const

/* spline value */
rbv Spline::operator(Scalar u) const

/* derivative order+1 derivative points */
rbv Spline::getDerValues(Scalar u, int order) const

/* no heap allocs, derivative order+1 derivative points */
template <int DerivativeOrder>
rbv Spline::getDerValues(Scalar u, int order = DerivativeOrder)

/* non-zero basis functions */
rbv Spline::basisFunctions(Scalar u) const

/* (order+1) - by - (degree+1) non-zero basis function derivatives */
rbv Spline::basisFunctionDerivatives(Scalar u, int order)

/* no heap allocs, (order+1) - by - (degree+1) non-zero basis function
derivatives */
tempalte <int DerivativeOrder>
rbv Spline::basisFunctionDerivatives(Scalar u, int order = DerivativeOrder)

int Spline::degree() const
int Spline::span(Scalar u) const


I'll be adding least-squares fitting soon and I am happy regarding any
kind of feedback and proposals regarding the interface...


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/