[eigen] eigen based splines
• To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
• Subject: [eigen] eigen based splines
• From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
• Date: Wed, 17 Feb 2010 14:57:36 +0100
• Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=U0zHVmCWT4lqeYmUI+Epveq6+g/pH1HLb+WuIJRKXobeRqcHNHKeQXByrKztKwAv54 SpGXwF9pXJz8qLLJkwWi31r80RyNuyqFnZy4uaZI2GMIgfG4lsv23jFewZh8nAr8ZL+/ 8FNKnO/6pWMljSfmR1Cs1IYESzCNv6itFuFmY=

```Hi,

I created a fork with an initial implementation of Eigen based
B-Splines. It is located over here:
http://bitbucket.org/hauke/eigen_splines/

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...

Cheers,
Hauke

```

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