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

Function c_check_equal

dlib/test/matrix3.cpp:52–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51 template <typename T, typename U>
52 void c_check_equal (
53 const T& a,
54 const U& b
55 )
56 {
57 DLIB_TEST(a.nr() == b.nr());
58 DLIB_TEST(a.nc() == b.nc());
59 typedef typename T::type type;
60 for (long r = 0; r < a.nr(); ++r)
61 {
62 for (long c = 0; c < a.nc(); ++c)
63 {
64 typename type::value_type error = std::abs(a(r,c) - b(r,c));
65 DLIB_TEST_MSG(error < std::sqrt(std::numeric_limits<typename type::value_type>::epsilon())*eps_mul, "error: " << error <<
66 " eps: " << std::sqrt(std::numeric_limits<typename type::value_type>::epsilon())*eps_mul);
67 }
68 }
69 }
70
71 template <typename T, typename U>
72 void assign_no_blas (

Callers 1

test_blasFunction · 0.85

Calls 4

absFunction · 0.85
sqrtFunction · 0.50
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected