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

Method test_event_corr

dlib/test/statistics.cpp:1052–1066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1050 }
1051
1052 void test_event_corr()
1053 {
1054 print_spinner();
1055 DLIB_TEST(event_correlation(1000,1000,500,2000) == 0);
1056 DLIB_TEST(std::abs(event_correlation(1000,1000,300,2000) + 164.565757010104) < 1e-11);
1057 DLIB_TEST(std::abs(event_correlation(1000,1000,700,2000) - 164.565757010104) < 1e-11);
1058
1059 DLIB_TEST(event_correlation(10,1000,5,2000) == 0);
1060 DLIB_TEST(event_correlation(1000,10,5,2000) == 0);
1061 DLIB_TEST(std::abs(event_correlation(10,1000,1,2000) - event_correlation(1000,10,1,2000)) < 1e-11);
1062 DLIB_TEST(std::abs(event_correlation(10,1000,9,2000) - event_correlation(1000,10,9,2000)) < 1e-11);
1063
1064 DLIB_TEST(std::abs(event_correlation(10,1000,1,2000) + 3.69672251700842) < 1e-11);
1065 DLIB_TEST(std::abs(event_correlation(10,1000,9,2000) - 3.69672251700842) < 1e-11);
1066 }
1067
1068 void perform_test (
1069 )

Callers

nothing calls this directly

Calls 3

print_spinnerFunction · 0.85
event_correlationFunction · 0.85
absFunction · 0.85

Tested by

no test coverage detected