Fix and enhance GradientProblemSolver::Summary::FullReport

1. Fix a bug which was causing the cost and gradient evaluation
   time to not be reported.
2. Add the number of times cost and gradients are evaluated to
   the Summary object and to the output of FullReport.

Change-Id: Id0703cd2dafbf437f3e537fbdc30ae81d5f4f540
This commit is contained in:
Sameer Agarwal
2017-06-28 06:26:04 -07:00
parent 62af68d8df
commit a9977da3eb
4 changed files with 30 additions and 9 deletions
+6
View File
@@ -301,6 +301,12 @@ class CERES_EXPORT GradientProblemSolver {
// IterationSummary for each minimizer iteration in order.
std::vector<IterationSummary> iterations;
// Number of times the cost (and not the gradient) was evaluated.
int num_cost_evaluations;
// Number of times the gradient (and the cost) were evaluated.
int num_gradient_evaluations;
// Sum total of all time spent inside Ceres when Solve is called.
double total_time_in_seconds;