mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Add ParameterBlock::IsSetConstantByUser()
Introduce IsSetConstantByUser method which indicates whether the user set the parameter block constant or not. Changed the definition of IsConstant() to indicate if the parameter block is effectively constant or not, which is now the uniion of two conditions - the user set it to be constant or the local tangent space is of size zero. Currently this change has no effect as we do not allow local parameterizations with zero tangent space size, but thats an inconsistency we are working on fixing. A variety of code cleans up to parameter_block.h 1. Remove an old TODO comment which is not really actionable. 2. Remove Init() method. 3. NULL -> nullptr 4. memcpy -> std::copy Change-Id: I12973ee0f053fa22f09908cf36e9aa57d9d8dd74
This commit is contained in:
@@ -649,7 +649,7 @@ bool ProblemImpl::IsParameterBlockConstant(double* values) const {
|
||||
<< "Parameter block not found: " << values << ". You must add the "
|
||||
<< "parameter block to the problem before it can be queried.";
|
||||
|
||||
return parameter_block->IsConstant();
|
||||
return parameter_block->IsSetConstantByUser();
|
||||
}
|
||||
|
||||
void ProblemImpl::SetParameterBlockVariable(double* values) {
|
||||
|
||||
Reference in New Issue
Block a user