simplicial_cholesky.cpp
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #include "sparse_solver.h"
11 
12 template<typename T, typename I> void test_simplicial_cholesky_T()
13 {
14  typedef SparseMatrix<T,0,I> SparseMatrixType;
15  SimplicialCholesky<SparseMatrixType, Lower> chol_colmajor_lower_amd;
16  SimplicialCholesky<SparseMatrixType, Upper> chol_colmajor_upper_amd;
17  SimplicialLLT< SparseMatrixType, Lower> llt_colmajor_lower_amd;
18  SimplicialLLT< SparseMatrixType, Upper> llt_colmajor_upper_amd;
19  SimplicialLDLT< SparseMatrixType, Lower> ldlt_colmajor_lower_amd;
20  SimplicialLDLT< SparseMatrixType, Upper> ldlt_colmajor_upper_amd;
23 
24  check_sparse_spd_solving(chol_colmajor_lower_amd);
25  check_sparse_spd_solving(chol_colmajor_upper_amd);
26  check_sparse_spd_solving(llt_colmajor_lower_amd);
27  check_sparse_spd_solving(llt_colmajor_upper_amd);
28  check_sparse_spd_solving(ldlt_colmajor_lower_amd);
29  check_sparse_spd_solving(ldlt_colmajor_upper_amd);
30 
31  check_sparse_spd_determinant(chol_colmajor_lower_amd);
32  check_sparse_spd_determinant(chol_colmajor_upper_amd);
33  check_sparse_spd_determinant(llt_colmajor_lower_amd);
34  check_sparse_spd_determinant(llt_colmajor_upper_amd);
35  check_sparse_spd_determinant(ldlt_colmajor_lower_amd);
36  check_sparse_spd_determinant(ldlt_colmajor_upper_amd);
37 
38  check_sparse_spd_solving(ldlt_colmajor_lower_nat, 300, 1000);
39  check_sparse_spd_solving(ldlt_colmajor_upper_nat, 300, 1000);
40 }
41 
43 {
44  CALL_SUBTEST_1(( test_simplicial_cholesky_T<double,int>() ));
45  CALL_SUBTEST_2(( test_simplicial_cholesky_T<std::complex<double>, int>() ));
46  CALL_SUBTEST_3(( test_simplicial_cholesky_T<double,long int>() ));
47 }
A versatible sparse matrix representation.
Definition: SparseMatrix.h:96
void check_sparse_spd_determinant(Solver &solver)
A direct sparse LDLT Cholesky factorizations without square root.
void test_simplicial_cholesky_T()
void test_simplicial_cholesky()
void check_sparse_spd_solving(Solver &solver, int maxSize=300, int maxRealWorldSize=100000)
A direct sparse LLT Cholesky factorizations.


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:44:02