Various fixes repored by Markus Moll. 1. Termination type was using == instead of =. 2. LevenbergMarquardtStrategyTest was using an object which was not returning the correct value. 3. DumpLinearLeastSquaresProblemToTextFile was passing an unnecessary argument to StringAppendF. Change-Id: Ie7598c8e3d504763c889737a0d5cec805d52bbaf
diff --git a/internal/ceres/levenberg_marquardt_strategy_test.cc b/internal/ceres/levenberg_marquardt_strategy_test.cc index 370d0a5..8338e5f 100644 --- a/internal/ceres/levenberg_marquardt_strategy_test.cc +++ b/internal/ceres/levenberg_marquardt_strategy_test.cc
@@ -70,7 +70,9 @@ EXPECT_NEAR(per_solve_options.D[i], diagonal_[i], kTolerance) << i << " " << per_solve_options.D[i] << " " << diagonal_[i]; } + return LinearSolver::Summary(); } + const int num_cols_; const double* diagonal_; };
diff --git a/internal/ceres/linear_least_squares_problems.cc b/internal/ceres/linear_least_squares_problems.cc index 05cb7aa..fccc3b1 100644 --- a/internal/ceres/linear_least_squares_problems.cc +++ b/internal/ceres/linear_least_squares_problems.cc
@@ -684,10 +684,7 @@ string matlab_script; StringAppendF(&matlab_script, - "function lsqp = lm_iteration_%03d()\n", - iteration, - iteration); - + "function lsqp = lm_iteration_%03d()\n", iteration); StringAppendF(&matlab_script, "lsqp.num_rows = %d;\n", A->num_rows()); StringAppendF(&matlab_script,
diff --git a/internal/ceres/solver_impl.cc b/internal/ceres/solver_impl.cc index ab91681..982fb40 100644 --- a/internal/ceres/solver_impl.cc +++ b/internal/ceres/solver_impl.cc
@@ -216,7 +216,7 @@ if (!program->CopyUserStateToParameterBlocks()) { // This can only happen if there was a numerical problem updating the local // jacobians. Indicate as such and fail out. - summary->termination_type == NUMERICAL_FAILURE; + summary->termination_type = NUMERICAL_FAILURE; summary->error = "Local parameterization failure."; return; }