math
math copied to clipboard
Interpolations with (different) boost units
Hey,
we (a physics group) are using the boost math (Barycentric Rational Interpolation and others) with boost units for our code. We have the problem, that the interpolation expects the same type for x and y data. In physics we quiet often have different units.
Could you extend the templates for different types/units for x and y.
Thanks in advance.
Yes, I think that's fine. Could you give me a main I could try to get working?
BTW, I recommend pchip or makima interpolation over barycentric rational for almost all uses (log(N) complexity rather than O(N), with less spurious oscillations).
i think something like this would be nice: https://github.com/L0ric0/boostorg-mat-issue-314
it could be that i was wrong with the template arguments for boost::math::barycentric_rational<quantity<si::energy, double>, quantity<si::electric_charge, double>>
but they should be the types of the axes for the function to interpolate.