MCPcopy Create free account
hub / github.com/davisking/dlib / test_blackman_nutall

Function test_blackman_nutall

dlib/test/math.cpp:303–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301 };
302
303 void test_blackman_nutall()
304 {
305 constexpr double tol = 1e-12;
306
307 for (size_t i = 0 ; i < 100 ; ++i)
308 {
309 DLIB_TEST(std::abs(dlib::blackman_nuttall(i, 100, SYMMETRIC) - NUTTALL_SYMMETRIC[i]) < tol);
310 DLIB_TEST(std::abs(dlib::blackman_nuttall(i, 100, PERIODIC) - NUTTALL_PERIODIC[i]) < tol);
311 }
312 }
313
314 /*! Data generated using scipy.signal.windows.blackmanharris(100, sym=True) !*/
315 const static double BLACKHARRIS_SYMMETRIC[100] = {

Callers 1

perform_testMethod · 0.85

Calls 2

absFunction · 0.85
blackman_nuttallFunction · 0.85

Tested by

no test coverage detected