Block ordering for SPARSE_SCHUR + CX_SPARSE.
Uptil now only SuiteSparse when used with SPARSE_SCHUR would use
the block structure of the reduced camera matrix to find a fill-reducing
ordering.
This leads to substantial speedup for some bundle adjustment
problems.
Credit for this technique goes to the authors of g2o. I learned
about it from reading their source code.
Change-Id: I5403efefd4d9552c9c6fc6e02a65498bdf171584
diff --git a/internal/ceres/cxsparse.h b/internal/ceres/cxsparse.h
index dd5eadc..d34b635 100644
--- a/internal/ceres/cxsparse.h
+++ b/internal/ceres/cxsparse.h
@@ -33,7 +33,9 @@
#ifndef CERES_NO_CXSPARSE
+#include <vector>
#include "cs.h"
+#include "ceres/internal/port.h"
namespace ceres {
namespace internal {
@@ -72,6 +74,10 @@
// The returned matrix should be deallocated with Free when not used anymore.
cs_dis* AnalyzeCholesky(cs_di* A);
+ cs_dis* BlockAnalyzeCholesky(cs_di* A,
+ const vector<int>& row_blocks,
+ const vector<int>& col_blocks);
+
void Free(cs_di* sparse_matrix);
void Free(cs_dis* symbolic_factorization);