MCPcopy Create free account
hub / github.com/colmap/colmap / TEST

Function TEST

src/colmap/math/matrix_test.cc:39–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace {
38
39TEST(DecomposeMatrixRQ, Nominal) {
40 for (int i = 0; i < 10; ++i) {
41 const Eigen::Matrix4d A = Eigen::Matrix4d::Random();
42
43 Eigen::Matrix4d R, Q;
44 DecomposeMatrixRQ(A, &R, &Q);
45
46 EXPECT_TRUE(R.bottomRows(4).isUpperTriangular());
47 EXPECT_TRUE(Q.isUnitary());
48 EXPECT_NEAR(Q.determinant(), 1.0, 1e-6);
49 EXPECT_THAT(A, EigenMatrixNear(Eigen::Matrix4d(R * Q), 1e-6));
50 }
51}
52
53} // namespace
54} // namespace colmap

Callers

nothing calls this directly

Calls 2

DecomposeMatrixRQFunction · 0.85
EigenMatrixNearFunction · 0.85

Tested by

no test coverage detected