Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax eigen22f test criteria #2553

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/common/test_eigen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,25 +556,25 @@ TEST (PCL, eigen22f)
// test if U * V * U^T = M
r_result = r_vectors * r_eigenvalues.asDiagonal () * r_vectors.transpose ();
r_error = r_result - r_matrix;
diff = r_error.cwiseAbs (). sum ();
diff = r_error.cwiseAbs ().maxCoeff ();
EXPECT_LE (diff, epsilon);

// test if the eigenvalues are orthonormal
g_result = r_vectors * r_vectors.transpose ();
g_error = g_result - RMatrix::Identity ();
diff = g_error.cwiseAbs (). sum ();
diff = g_error.cwiseAbs ().maxCoeff ();
EXPECT_LE (diff, epsilon);

// test if column major matrices are also calculated correctly
eigen22 (c_matrix, c_vectors, c_eigenvalues);
c_result = c_vectors * c_eigenvalues.asDiagonal () * c_vectors.transpose ();
c_error = c_result - c_matrix;
diff = c_error.cwiseAbs (). sum ();
diff = c_error.cwiseAbs ().maxCoeff ();
EXPECT_LE (diff, epsilon);

g_result = c_vectors * c_vectors.transpose ();
g_error = g_result - CMatrix::Identity ();
diff = g_error.cwiseAbs (). sum ();
diff = g_error.cwiseAbs ().maxCoeff ();
EXPECT_LE (diff, epsilon);
}
}
Expand Down