C++ implimentation of monotonic cspline interpolation