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

Function TEST

src/colmap/optim/sparse_cholesky_test.cc:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64TEST(SparseCholeskyWithFallbackSolver, ComputeAndSolveDiagonal) {
65 Eigen::SparseMatrix<double> A(3, 3);
66 A.insert(0, 0) = 2;
67 A.insert(1, 1) = 3;
68 A.insert(2, 2) = 4;
69
70 SparseCholeskyWithFallbackSolver solver;
71 ASSERT_TRUE(solver.Compute(A));
72
73 Eigen::VectorXd b(3);
74 b << 2, 6, 12;
75 Eigen::VectorXd x;
76 ASSERT_TRUE(solver.Solve(b, &x));
77 EXPECT_THAT(x, EigenMatrixNear(Eigen::Vector3d(1, 2, 3)));
78}
79
80TEST(SparseCholeskyWithFallbackSolver, ComputeAndSolveChain) {
81 const Eigen::SparseMatrix<double> A = ChainLaplacianGaugeFixed(10);

Callers

nothing calls this directly

Calls 6

EigenMatrixNearFunction · 0.85
ChainLaplacianGaugeFixedFunction · 0.85
AnalyzePatternMethod · 0.80
FactorizeMethod · 0.80
ComputeMethod · 0.45
SolveMethod · 0.45

Tested by

no test coverage detected