Add the ability to query the Problem about parameter blocks.
Change-Id: Ieda1aefa28e7a1d18fe6c8d1665882e4d9c274f2
diff --git a/include/ceres/problem.h b/include/ceres/problem.h
index 0a449cb..707a8eb 100644
--- a/include/ceres/problem.h
+++ b/include/ceres/problem.h
@@ -328,6 +328,19 @@
// sizes of all of the residual blocks.
int NumResiduals() const;
+ // The size of the parameter block.
+ int ParameterBlockSize(double* values) const;
+
+ // The size of local parameterization for the parameter block. If
+ // there is no local parameterization associated with this parameter
+ // block, then ParmeterBlockLocalSize = ParameterBlockSize.
+ int ParameterBlockLocalSize(double* values) const;
+
+ // Fills the passed parameter_blocks vector with pointers to the
+ // parameter blocks currently in the problem. After this call,
+ // parameter_block.size() == NumParameterBlocks.
+ void GetParameterBlocks(vector<double*>* parameter_blocks) const;
+
// Options struct to control Problem::Evaluate.
struct EvaluateOptions {
EvaluateOptions()