Changeset 465 for library/tests/mat_checks.cpp
- Timestamp:
- 08/03/09 08:09:16 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/mat_checks.cpp
r456 r465 12 12 for (int i = 0; i < expected.length(); ++i) { 13 13 if (!AreClose(expected(i), actual(i), tolerance)) { 14 return false; 15 } 16 } 17 18 return true; 19 } 20 21 bool AreClose(const itpp::vec &expected, const itpp::vec &actual, 22 const itpp::vec &tolerance) { 23 if ((expected.length() != actual.length()) || 24 (actual.length() != tolerance.length())) { 25 return false; 26 } 27 28 for (int i = 0; i < expected.length(); ++i) { 29 if (!AreClose(expected(i), actual(i), tolerance(i))) { 14 30 return false; 15 31 }