diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-31 21:38:13 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-04-07 07:24:19 -0500 |
commit | d9f4d540ef334013eb404ce91b3b446e5fc917ff (patch) | |
tree | e5b7b405f567d414b24f5acca2aae78bc27267a5 /host/tests/math_test.cpp | |
parent | ff17d7428be5af109a2a74f916271761505ebee7 (diff) | |
download | uhd-d9f4d540ef334013eb404ce91b3b446e5fc917ff.tar.gz uhd-d9f4d540ef334013eb404ce91b3b446e5fc917ff.tar.bz2 uhd-d9f4d540ef334013eb404ce91b3b446e5fc917ff.zip |
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
Diffstat (limited to 'host/tests/math_test.cpp')
-rw-r--r-- | host/tests/math_test.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/host/tests/math_test.cpp b/host/tests/math_test.cpp index bff6fc16f..c1b6793bb 100644 --- a/host/tests/math_test.cpp +++ b/host/tests/math_test.cpp @@ -17,13 +17,3 @@ BOOST_AUTO_TEST_CASE(test_gcd) { BOOST_CHECK_EQUAL(uhd::math::gcd<int>(6, 15), 3); } - -BOOST_AUTO_TEST_CASE(test_interp) -{ - const double x0 = 1.0, x1 = 2.0; - const double y0 = 2.0, y1 = 4.0; - const double x = 1.5; - const double y_exp = 3.0; - - BOOST_CHECK_EQUAL(uhd::math::linear_interp<double>(x, x0, y0, x1, y1), y_exp); -} |