Add Problem::SetParameterLowerBound and Problem::SetParameterUpperBound.
These two methods allow the user to associate upper and lower bounds
with individual parameters inside parameter blocks.
Change-Id: I68dc37f20b64408da510ba06b89a4f08df54ddad
diff --git a/include/ceres/problem.h b/include/ceres/problem.h
index 77ff970..a7d7815 100644
--- a/include/ceres/problem.h
+++ b/include/ceres/problem.h
@@ -300,7 +300,7 @@
// Hold the indicated parameter block constant during optimization.
void SetParameterBlockConstant(double* values);
- // Allow the indicated parameter to vary during optimization.
+ // Allow the indicated parameter block to vary during optimization.
void SetParameterBlockVariable(double* values);
// Set the local parameterization for one of the parameter blocks.
@@ -317,6 +317,10 @@
// associated then NULL is returned.
const LocalParameterization* GetParameterization(double* values) const;
+ // Set the lower/upper bound for the parameter with position "index".
+ void SetParameterLowerBound(double* values, int index, double lower_bound);
+ void SetParameterUpperBound(double* values, int index, double upper_bound);
+
// Number of parameter blocks in the problem. Always equals
// parameter_blocks().size() and parameter_block_sizes().size().
int NumParameterBlocks() const;