Enable support for dumping trust region minimizer problems.
This support was broken due to the TrustRegionMinimizer refactoring.
It is now enabled again, with the responsibilty for dumping the
problem shifted to the individual TrustRegionStrategy.
There is however one wrinkle, which is perhaps an indication of
poor design to start with. The LinearLeastSquaresProblemProto
carries in it num_eliminate_blocks, something which does not
exist anymore. More importantly, the TrustRegionStrategy does not
have access to this quantity anymore.
Dealing with this will be the subject of a future change.
Change-Id: I358adf6a2e386f4940b617bf950d6c7e87d2635d
diff --git a/include/ceres/solver.h b/include/ceres/solver.h
index 8bf87f9..a86a586 100644
--- a/include/ceres/solver.h
+++ b/include/ceres/solver.h
@@ -106,8 +106,8 @@
inner_iteration_ordering = NULL;
logging_type = PER_MINIMIZER_ITERATION;
minimizer_progress_to_stdout = false;
- lsqp_dump_directory = "/tmp";
- lsqp_dump_format_type = TEXTFILE;
+ trust_region_problem_dump_directory = "/tmp";
+ trust_region_problem_dump_format_type = TEXTFILE;
check_gradients = false;
gradient_check_relative_precision = 1e-8;
numeric_derivative_relative_step_size = 1e-6;
@@ -490,14 +490,17 @@
// is sent to STDOUT.
bool minimizer_progress_to_stdout;
- // List of iterations at which the optimizer should dump the
- // linear least squares problem to disk. Useful for testing and
- // benchmarking. If empty (default), no problems are dumped.
- //
- // This is ignored if protocol buffers are disabled.
- vector<int> lsqp_iterations_to_dump;
- string lsqp_dump_directory;
- DumpFormatType lsqp_dump_format_type;
+ // List of iterations at which the minimizer should dump the trust
+ // region problem. Useful for testing and benchmarking. If empty
+ // (default), no problems are dumped.
+ vector<int> trust_region_minimizer_iterations_to_dump;
+
+ // Directory to which the problems should be written to. Should be
+ // non-empty if trust_region_minimizer_iterations_to_dump is
+ // non-empty and trust_region_problem_dump_format_type is not
+ // CONSOLE.
+ string trust_region_problem_dump_directory;
+ DumpFormatType trust_region_problem_dump_format_type;
// Finite differences options ----------------------------------------------