3 ms·
Nice and slim - does your cubic spline support clamping and monotonicity as well by any chance ?
by almoehi 4y ago
Nice and slim - does your cubic spline support clamping and monotonicity as well by any chance ?
- ermeel 4y agoDo you have an example or reference describing how clamping and monotonicity in the context of cubic splines are implemented? Thanks.
- nullc 4y agohttps://en.wikipedia.org/wiki/Monotone_cubic_interpolation 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.
- codeboy7432 4y agoI 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).