mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Expand check for lack of a sparse linear algebra library.
The LinearSolver factory was creating a NULL linear solver if only Eigen's sparse linear algebra backend was available. Thanks to Michael Samples and Domink Reitzle for reporting this. Change-Id: I35e3a6c0fd0da2a31934adb5dfe4cad29577cc73
This commit is contained in:
@@ -75,14 +75,18 @@ LinearSolver* LinearSolver::Create(const LinearSolver::Options& options) {
|
||||
return new CgnrSolver(options);
|
||||
|
||||
case SPARSE_NORMAL_CHOLESKY:
|
||||
#if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE)
|
||||
#if defined(CERES_NO_SUITESPARSE) && \
|
||||
defined(CERES_NO_CXSPARSE) && \
|
||||
!defined(CERES_USE_EIGEN_SPARSE)
|
||||
return NULL;
|
||||
#else
|
||||
return new SparseNormalCholeskySolver(options);
|
||||
#endif
|
||||
|
||||
case SPARSE_SCHUR:
|
||||
#if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE)
|
||||
#if defined(CERES_NO_SUITESPARSE) && \
|
||||
defined(CERES_NO_CXSPARSE) && \
|
||||
!defined(CERES_USE_EIGEN_SPARSE)
|
||||
return NULL;
|
||||
#else
|
||||
return new SparseSchurComplementSolver(options);
|
||||
|
||||
Reference in New Issue
Block a user