ceres-solver
ceres-solver copied to clipboard
Unclear line of code to check for constant parameter block in BlockJacobianWriter::CreateJacobian()
trafficstars
Inside the function BlockJacobianWriter::CreateJacobian() at line 186 in block_jacobian_writer.cc, the following line checks if the parameter block is constant:
if (residual_block->parameter_blocks()[j]->index() != -1)
For improved clarity, this line should be changed to:
if (!residual_block->parameter_blocks()[j]->IsConstant())
Yes this is some ancient code, and it is likely that at this point parameter_block did not have an IsConstant method, I will look into modernizing it.