[eigen] eigen based splines |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] eigen based splines
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Wed, 17 Feb 2010 14:57:36 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=VvfsxOVP8lZe5jHf1GG8NzFfqhHgjYTZVQnB1M/OO6k=; b=CYaI3RfS599pg8aLTiWtlvH6ytb8IxLVM19VLIWAL5PkCi6kZyNZTB0rXpYB/BKrHV 4H+Glj2g4fnWD+xk0J33Q5xX3RSsiIk6ge7KCaDem7PnuXCqjDQmOXCOKS5nhvYiGBnk WTG2d/Gu4Iebp8LBVzuaHxoH5W0UO/vtnDVQo=
- 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