mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Refactor suitesparse.h/cc
1. Generalize SuiteSparse::AnalyzeCholesky and SuiteSparse::BlockAnalyzeCholesky from just doing AMD to taking OrderingType as an argument and using that to determine whether AMD & Nested Dissection algorithms are used for computing the fill-reducing ordering or a natural ordering when computing the symbolic factorization. 2. Remove AnalyzeCholeskyWithNaturalOrdering. 3. Replace and generalize SuiteSparse::BlockAMDOrdering with SuiteSparse::BlockOrdering which also takes OrderingType as an argument. Same for SuiteSparse::ApproximateMinimumDegreeOrdering and SuiteSparse::NestedDissectionOrdering by SuiteSparse::Ordering. 4. Remove LinearSolver::Options::use_postordering and replace it with LinearSolver::Options::ordering_type. 5. Replace Preconditioner::Options::use_postordering and replace it with Preconditioner::Options::ordering_type. 6. Add NESDIS to OrderingType. With the above changes, the linear solvers can now use Nested Dissection once this information is piped through the nonlinear solver. Change-Id: Ib8e93fbf34ae2981bf2ac54dcda9e25c7c213790
This commit is contained in:
@@ -123,7 +123,7 @@ void OrderingForSparseNormalCholeskyUsingSuiteSparse(
|
||||
// If the user did not supply a useful ordering, then just use
|
||||
// regular AMD.
|
||||
if (parameter_block_ordering.NumGroups() <= 1) {
|
||||
ss.ApproximateMinimumDegreeOrdering(block_jacobian_transpose, &ordering[0]);
|
||||
ss.Ordering(block_jacobian_transpose, OrderingType::AMD, &ordering[0]);
|
||||
} else {
|
||||
vector<int> constraints;
|
||||
for (auto* parameter_block : parameter_blocks) {
|
||||
|
||||
Reference in New Issue
Block a user