From 6447219826bf6e47b0c99d9ff0eaf5e2ba573d79 Mon Sep 17 00:00:00 2001 From: Sameer Agarwal Date: Thu, 3 May 2012 21:53:07 -0700 Subject: [PATCH] 1. Changes the tutorial to refer to BriefReport. 2. Some of the enums have commas at the end. 3. Fix a bug in the default value of circle_fit.cc in the examples. --- docs/tutorial.tex | 2 +- examples/circle_fit.cc | 4 ++-- include/ceres/numeric_diff_cost_function.h | 2 +- include/ceres/types.h | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/tutorial.tex b/docs/tutorial.tex index e48967366..da9c29ef3 100644 --- a/docs/tutorial.tex +++ b/docs/tutorial.tex @@ -84,7 +84,7 @@ int main(int argc, char** argv) { ceres::Solver::Summary summary; ceres::Solve(options, &problem, &summary); - std::cout << summary.BriefSummary() << "\n"; + std::cout << summary.BriefReport() << "\n"; std::cout << "x : 5.0 -> " << x << "\n"; return 0; } diff --git a/examples/circle_fit.cc b/examples/circle_fit.cc index a04413444..07d690ed1 100644 --- a/examples/circle_fit.cc +++ b/examples/circle_fit.cc @@ -64,7 +64,7 @@ using ceres::Problem; using ceres::Solve; using ceres::Solver; -DEFINE_double(robust_threshold, -1.0, "Robust loss parameter. Set to -1 for " +DEFINE_double(robust_threshold, 0.0, "Robust loss parameter. Set to 0 for " "normal squared error (no robustification)."); // The cost for a single sample. The returned residual is related to the @@ -88,7 +88,7 @@ class DistanceFromCircleCost { // It is tempting to use the following cost: // - // residual[0] = *r - sqrt(xp*xp + yp*yp); + // residual[0] = r - sqrt(xp*xp + yp*yp); // // which is the distance of the sample from the circle. This works // reasonably well, but the sqrt() adds strong nonlinearities to the cost diff --git a/include/ceres/numeric_diff_cost_function.h b/include/ceres/numeric_diff_cost_function.h index 736fb9722..bbaefca5b 100644 --- a/include/ceres/numeric_diff_cost_function.h +++ b/include/ceres/numeric_diff_cost_function.h @@ -72,7 +72,7 @@ namespace ceres { enum NumericDiffMethod { CENTRAL, - FORWARD, + FORWARD }; // This is split from the main class because C++ doesn't allow partial template diff --git a/include/ceres/types.h b/include/ceres/types.h index e23786cf7..ea41b4d46 100644 --- a/include/ceres/types.h +++ b/include/ceres/types.h @@ -88,7 +88,7 @@ enum LinearSolverType { // This is not meant for direct client use; it is used under the // hood while using ITERATIVE_SCHUR. Once there is a decent // preconditioner, this will make sense for general sparse problems. - CONJUGATE_GRADIENTS, + CONJUGATE_GRADIENTS }; enum PreconditionerType { @@ -150,11 +150,11 @@ enum OrderingType { // The options get progressively noisier. enum LoggingType { SILENT, - PER_MINIMIZER_ITERATION, + PER_MINIMIZER_ITERATION }; enum MinimizerType { - LEVENBERG_MARQUARDT, + LEVENBERG_MARQUARDT }; enum SolverTerminationType { @@ -191,7 +191,7 @@ enum SolverTerminationType { USER_ABORT, // User's IterationCallback returned SOLVER_TERMINATE_SUCCESSFULLY - USER_SUCCESS, + USER_SUCCESS }; // Enums used by the IterationCallback instances to indicate to the