mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Fix a bug in covariance_impl.cc
A matrix reference was being incorrectly sized. It was using the block_size number of rows, where as there are only block_local_size number of rows that are present in the underlying matrix. This did not affect the correctness of the resulting code, because right after construction we then access a subblock with block_local_size rows. Thanks to William Gandler for reporting this. Change-Id: I35e1f5a30b79e31b0b9fac79f7e361821d6073df
This commit is contained in:
@@ -217,7 +217,7 @@ bool CovarianceImpl::GetCovarianceBlockInTangentOrAmbientSpace(
|
||||
const int block2_local_size = block2->LocalSize();
|
||||
|
||||
ConstMatrixRef cov(
|
||||
covariance_matrix_->values() + rows[row_begin], block1_size, row_size);
|
||||
covariance_matrix_->values() + rows[row_begin], block1_local_size, row_size);
|
||||
|
||||
// Fast path when there are no local parameterizations or if the
|
||||
// user does not want it lifted to the ambient space.
|
||||
|
||||
Reference in New Issue
Block a user