MCPcopy Create free account
hub / github.com/comaps/comaps / Equal

Method Equal

libs/base/matrix.hpp:56–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55 template <typename U>
56 bool Equal(Matrix<U, Rows, Cols> const & m, T eps = 0.0001) const
57 {
58 for (size_t i = 0; i < Rows; ++i)
59 for (size_t j = 0; j < Cols; ++j)
60 if (Abs(m_data[i * Cols + j] - m(i, j)) > eps)
61 return false;
62
63 return true;
64 }
65
66 template <typename U>
67 bool operator!=(Matrix<U, Rows, Cols> const & m) const

Callers 1

UNIT_TESTFunction · 0.45

Calls 1

AbsFunction · 0.85

Tested by 1

UNIT_TESTFunction · 0.36