mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Fix an off by one error in the transpose code.
Change-Id: I0ebcf2e8e29dc48376f60c3fa8d6100b20ec105f
This commit is contained in:
@@ -78,7 +78,7 @@ void TransposeForCompressedRowSparseStructure(const int num_rows,
|
||||
int* transpose_cols,
|
||||
double* transpose_values) {
|
||||
// Explicitly zero out transpose_rows.
|
||||
std::fill(transpose_rows, transpose_rows + num_cols, 0);
|
||||
std::fill(transpose_rows, transpose_rows + num_cols + 1, 0);
|
||||
|
||||
// Count the number of entries in each column of the original matrix
|
||||
// and assign to transpose_rows[col + 1].
|
||||
|
||||
Reference in New Issue
Block a user