Update testlib
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
|
||||
#include "testlib.hpp"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
static void print_message(std::string msg)
|
||||
{
|
||||
if (msg.size() > 0) {
|
||||
@@ -42,17 +40,3 @@ void m_assert(bool expr, std::string expr_str, std::string f, std::string file,
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
bool close_to(arma::vec &a, arma::vec &b, double tol)
|
||||
{
|
||||
if (a.n_elem != b.n_elem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < a.n_elem; i++) {
|
||||
if (std::abs(a(i) - b(i)) >= tol) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user