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

Function test_hann

dlib/test/math.cpp:208–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206 };
207
208 void test_hann()
209 {
210 constexpr double tol = 1e-12;
211
212 for (size_t i = 0 ; i < 100 ; ++i)
213 {
214 DLIB_TEST(std::abs(dlib::hann(i, 100, SYMMETRIC) - HANN_SYMMETRIC[i]) < tol);
215 DLIB_TEST(std::abs(dlib::hann(i, 100, PERIODIC) - HANN_PERIODIC[i]) < tol);
216 }
217 }
218
219
220 /*! Data generated using scipy.signal.windows.blackman(100, sym=True) !*/

Callers 1

perform_testMethod · 0.85

Calls 2

absFunction · 0.85
hannFunction · 0.85

Tested by

no test coverage detected