mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Add DynamicSparseNormalCholeskySolver
This code was currently buried under a bool inside SparseNormalCholeskySolver. Pulling this out in its own solver makes the code simpler more readable and more performant in the case of SuiteSparse. Change-Id: I72379ca9ca162abbb83c12f7ee8ff92bc71e772c
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "ceres/dense_qr_solver.h"
|
||||
#include "ceres/iterative_schur_complement_solver.h"
|
||||
#include "ceres/schur_complement_solver.h"
|
||||
#include "ceres/dynamic_sparse_normal_cholesky_solver.h"
|
||||
#include "ceres/sparse_normal_cholesky_solver.h"
|
||||
#include "ceres/types.h"
|
||||
#include "glog/logging.h"
|
||||
@@ -80,6 +81,10 @@ LinearSolver* LinearSolver::Create(const LinearSolver::Options& options) {
|
||||
!defined(CERES_USE_EIGEN_SPARSE)
|
||||
return NULL;
|
||||
#else
|
||||
if (options.dynamic_sparsity) {
|
||||
return new DynamicSparseNormalCholeskySolver(options);
|
||||
}
|
||||
|
||||
return new SparseNormalCholeskySolver(options);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user