From d9f4d540ef334013eb404ce91b3b446e5fc917ff Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 31 Mar 2020 21:38:13 -0700 Subject: 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 --- host/tests/math_test.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'host/tests/math_test.cpp') 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(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(x, x0, y0, x1, y1), y_exp); -} -- cgit v1.2.3