Move EvaluationCallback from Solver::Options to Problem::Options.

Adding it to Solver::Options was a mistake, as it prevents it from
being used in covariance estimation. Also updated associated docs.

https://github.com/ceres-solver/ceres-solver/issues/380
https://github.com/ceres-solver/ceres-solver/issues/401
https://github.com/ceres-solver/ceres-solver/issues/484

Change-Id: I63809a47a58e84c04a58bf8e59ace92f45fc2873
This commit is contained in:
Sameer Agarwal
2019-06-04 21:57:01 -07:00
parent 059bcb7f86
commit bf709ecac2
15 changed files with 393 additions and 246 deletions
+2 -1
View File
@@ -60,7 +60,8 @@ bool SetupEvaluator(PreprocessedProblem* pp) {
pp->evaluator_options.num_eliminate_blocks = 0;
pp->evaluator_options.num_threads = pp->options.num_threads;
pp->evaluator_options.context = pp->problem->context();
pp->evaluator_options.evaluation_callback = pp->options.evaluation_callback;
pp->evaluator_options.evaluation_callback =
pp->reduced_program->mutable_evaluation_callback();
pp->evaluator.reset(Evaluator::Create(pp->evaluator_options,
pp->reduced_program.get(),
&pp->error));