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

Function test_blackman

dlib/test/math.cpp:258–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256 };
257
258 void test_blackman()
259 {
260 constexpr double tol = 1e-12;
261
262 for (size_t i = 0 ; i < 100 ; ++i)
263 {
264 DLIB_TEST(std::abs(dlib::blackman(i, 100, SYMMETRIC) - BLACKMAN_SYMMETRIC[i]) < tol);
265 DLIB_TEST(std::abs(dlib::blackman(i, 100, PERIODIC) - BLACKMAN_PERIODIC[i]) < tol);
266 }
267 }
268
269 /*! Data generated using scipy.signal.windows.nuttall(100, sym=True) !*/
270 const static double NUTTALL_SYMMETRIC[100] = {

Callers 1

perform_testMethod · 0.85

Calls 2

absFunction · 0.85
blackmanFunction · 0.85

Tested by

no test coverage detected