Commit Graph

6 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
6100f1758f Fix variable shadowing warning. 2014-02-05 15:05:26 +01:00
Andreas Lauser
ae901534c3 spline: fix the monotinic_() method and creation of monotonic splines
also, extend the unit test for it. (*phew* that was much more fun than
appreciated because of all the index shifts. I'm still not 100% sure
that everything works in all corner cases, but at least my confidence
is at 95%.)
2013-11-07 19:53:31 +01:00
Andreas Lauser
c9067c4bda spline: some fixes to make Spline::intersect() work correctly
most of these issues are fallout from the conversion of the spline
class from a moments (second derivative) based approach to hermite
base functions:

- the second and third derivatives where incorrect, and the third
  derivative was not available in the public interface.
- The unit test did not check the derivatives
- The coefficients for the monomial basis were off by the factors
  stemming from the derivatives
- The intersectIntervall_() method used std::max() instead of
  std::min() at one place and still added the base offset for the x
  values as indicated by Stoer
2013-11-07 15:06:59 +01:00
Roland Kaufmann
cbe232e880 Add missing header include 2013-09-20 10:51:18 +02:00
Andreas Lauser
0d0ab3bd5a refactor the spline code: merge everything into one class 2013-09-19 18:48:54 +02:00
Andreas Lauser
8ef3b6e6c7 introduce classes for monotonic, full, periodic and natural cubic splines 2013-09-09 13:29:50 +02:00