mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Refactor SparseNormalCholeskySolver
Now that there is a single piece of code doing the outer product computation for all three sparse linear algebra backends, move this code one level up the call stack and there by make the actual per-library solver code shorter and simpler. Also fix a minor omission in the outer product computation code where row/column blocks were not being copied over to the outer product matrix. Change-Id: I22a7967bdc659385b741901afefa7af312e676e5
This commit is contained in:
@@ -561,6 +561,9 @@ CompressedRowSparseMatrix* CreateOuterProductMatrix(
|
||||
new CompressedRowSparseMatrix(num_cols, num_cols, num_nonzeros);
|
||||
matrix->set_storage_type(storage_type);
|
||||
|
||||
*(matrix->mutable_row_blocks()) = blocks;
|
||||
*(matrix->mutable_col_blocks()) = blocks;
|
||||
|
||||
// Compute block offsets for outer product matrix, which is used in
|
||||
// ComputeOuterProduct.
|
||||
vector<int>* block_offsets = matrix->mutable_block_offsets();
|
||||
|
||||
Reference in New Issue
Block a user