Skip to content

swvanbuuren/cubinterpp

Repository files navigation

cubinterpp

N-dimensional cubic and linear interpolation in modern C++ with Python support.

Comparison of 1D interpolation types
1D interpolation
Linear interpolation Monotonic spline interpolation
2D Linear interpolation 2D Monotonic cubic spline interpolation
2D Akima spline interpolation 2D Natural spline interpolation
2D Akima spline interpolation 2D Natural spline interpolation

Introduction

This C++ header library features tools for piecewise linear and cubic interpolation in N dimensions.

For cubic piecewise interpolation, the library features three types:

  • Monotone cubic interpolation
  • Akima spline interpolation
  • Natural cubic spline interpolation

All classes are templatized and support the STL's vector types.

The accompanying python script in cubinterpp compares the interpolation types.

Refer to the documentation for:

License

An MIT style license applies for cubinterpp, see the LICENSE file for more details.