Consolidate SolverTerminationType enum.
1. Rename SolverTerminationType to TerminationType.
2. Consolidate the enum as
a. CONVERGENCE - subsumes FUNCTION_TOLERANCE, PARAMETER_TOLERANCE and GRADIENT_TOLERANCE
b. NO_CONVERGENCE
c. FAILURE - captures all kinds of failures including DID_NOT_RUN.
d. USER_SUCCESS
e. USER_FAILURE
3. Solver::Summary::error is renamed to be Solver::Summary::message, to both
reduce confusion as well as capture its true meaning.
Change-Id: I27a382e66e67f5a4750d0ee914d941f6b53c326d
diff --git a/include/ceres/solver.h b/include/ceres/solver.h
index 7776c47..f0d5be6 100644
--- a/include/ceres/solver.h
+++ b/include/ceres/solver.h
@@ -714,14 +714,15 @@
// termination.
string FullReport() const;
+ bool IsSolutionUsable() const;
+
// Minimizer summary -------------------------------------------------
MinimizerType minimizer_type;
- SolverTerminationType termination_type;
+ TerminationType termination_type;
- // If the solver did not run, or there was a failure, a
- // description of the error.
- string error;
+ // Reason why the solver terminated.
+ string message;
// Cost of the problem (value of the objective function) before
// the optimization.