hadronized / splines

Interpolation made easy.
https://crates.io/crates/splines
Other
162 stars 31 forks source link

Support for extrapolation #48

Open GRASBOCK opened 3 years ago

GRASBOCK commented 3 years ago

I really wish that there was extrapolation. I cannot use it for sampling data outside bounds. clamping is not an option for me. Even linear extrapolation would be ok

hadronized commented 3 years ago

Hello!

Sure, why not! I don’t have that much knowledge on extrapolation, but I would be willing to add the feature to the crate!

GRASBOCK commented 3 years ago

Great! A simple extended tangent at the ends would be enough. Or second derivative to match endpoint. Or both as a toggle. I actually built my own spline crate yesterday because I needed extrapolation. What do you say if I try to integrate that makima spline into your crate?

hadronized commented 3 years ago

I’m not a huge fan of how they seem to be doing extrapolation. I think it would be much more elegant to re-use the first / last polynomial.