ullmannJan / B-Splines

Quick B-Spline algorithm in C++17
MIT License
3 stars 0 forks source link

B-Splines

A fast algorithm in C++ inspired by De Boor's algorithm to calculate Bsplines of arbitrary order and their derivatves.

The file ´bSplines.hpp´ contains three methods

  1. ndxBsplinesHelper(ArrayXd &splines, ArrayXd &knotsInput, int index, uint nDeriv=1)
  2. bSplinesWithDeriv(double x, ArrayXd &knotsInput, int kOrd, int nDeriv=0)
  3. ndxBsplines(double x, ArrayXd &knotsInput, int kOrd, int nDeriv=1)

It is recommended to use ndxBsplines() if you just need the splines or just the derivative. In case you need both together use method bSplinesWithDeriv()