Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice and slim - does your cubic spline support clamping and monotonicity as well by any chance ?


Do you have an example or reference describing how clamping and monotonicity in the context of cubic splines are implemented? Thanks.


https://en.wikipedia.org/wiki/Monotone_cubic_interpolation has some reference for monotone cubic splines.

In theory they should be useful when know that the underlying process should be monotone. I think in the past I found them more sensitive to noise and wondered if monotone approximation might not be better than monotone interpolation for that reason.


I added class comments to each class which explain the high level implementation details. Clamping is supported with natural cubic splines, and this is done by taking the slopes at each endpoint.

Monotonicity is currently not supported (for cubic splines).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: