Commit graph

3 commits

Author SHA1 Message Date
Martin Braun
760abdf703 lib: utils: interpolation: Add bilinear interpolation
This allows to treat a std::map<KeyType<std::map<KeyType, ValueType>> as
a set of x-y coordinates, and bilinearly interpolate a z-value given
four x/y pairs.
2020-04-17 07:58:19 -05:00
Lane Kolbly
5802a362f8 uhd: Replace include guards with pragma once
Pragma once is the more modern version of include guards, eliminating
any potential problems with mistyping include guards. Let's use those.
2020-04-08 15:16:06 -05:00
Martin Braun
d9f4d540ef uhd: math: Add interpolation.hpp
- Moves linear_interp from cal to utils
- Moves the interp_mode enum class to interpolation.hpp
- Adds three interpolation methods for maps: at_interpolate_1d(),
  at_nearest(), at_lin_interp()
- Adds unit tests
2020-04-07 07:24:19 -05:00