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

Function test_kaiser

dlib/test/math.cpp:162–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 };
161
162 void test_kaiser()
163 {
164 constexpr double tol = 1e-7;
165
166 for (size_t i = 0 ; i < 100 ; ++i)
167 {
168 DLIB_TEST(std::abs(dlib::kaiser(i, 100, beta_t{10.0}, SYMMETRIC) - KAISER_DATA_N_100_BETA_10[i]) < tol);
169 DLIB_TEST(std::abs(dlib::kaiser(i, 100, attenuation_t{60.0}, SYMMETRIC) - KAISER_DATA_N_100_ATT_60_SYMMETRIC[i]) < tol);
170 DLIB_TEST(std::abs(dlib::kaiser(i, 100, attenuation_t{60.0}, PERIODIC) - KAISER_DATA_N_100_ATT_60_PERIODIC[i]) < tol);
171 }
172 }
173
174 /*! Data generated using scipy.signal.windows.hann(100, sym=True) !*/
175 const static double HANN_SYMMETRIC[100] = {

Callers 1

perform_testMethod · 0.85

Calls 2

absFunction · 0.85
kaiserFunction · 0.85

Tested by

no test coverage detected