Fix few typos and alter a NULL to nullptr. Fix typos in docs/source/features.rst and examples/helloworld.cc. Alter a NULL to nullptr in include/ceres/autodiff_cost_function.h Change-Id: Ibcf00b6ef665ad6be9af14b3add2dd4f3852e7e6
diff --git a/docs/source/features.rst b/docs/source/features.rst index e71bd39..348511d 100644 --- a/docs/source/features.rst +++ b/docs/source/features.rst
@@ -44,7 +44,7 @@ solvers - dense QR and dense Cholesky factorization (using `Eigen`_ or `LAPACK`_) for dense problems, sparse Cholesky factorization (`SuiteSparse`_, `CXSparse`_ or `Eigen`_) for large - sparse problems custom Schur complement based dense, sparse, and + sparse problems, custom Schur complement based dense, sparse, and iterative linear solvers for `bundle adjustment`_ problems. - **Line Search Solvers** - When the problem size is so large that @@ -63,7 +63,7 @@ * **Covariance estimation** - Evaluate the sensitivity/uncertainty of the solution by evaluating all or part of the covariance - matrix. Ceres is one of the few solvers that allows you to to do + matrix. Ceres is one of the few solvers that allows you to do this analysis at scale. * **Community** Since its release as an open source software, Ceres
diff --git a/examples/helloworld.cc b/examples/helloworld.cc index 22dff55..d5d546c 100644 --- a/examples/helloworld.cc +++ b/examples/helloworld.cc
@@ -39,15 +39,16 @@ using ceres::AutoDiffCostFunction; using ceres::CostFunction; using ceres::Problem; -using ceres::Solver; using ceres::Solve; +using ceres::Solver; // A templated cost functor that implements the residual r = 10 - // x. The method operator() is templated so that we can then use an // automatic differentiation wrapper around it to generate its // derivatives. struct CostFunctor { - template <typename T> bool operator()(const T* const x, T* residual) const { + template <typename T> + bool operator()(const T* const x, T* residual) const { residual[0] = 10.0 - x[0]; return true; } @@ -68,7 +69,7 @@ // auto-differentiation to obtain the derivative (jacobian). CostFunction* cost_function = new AutoDiffCostFunction<CostFunctor, 1, 1>(new CostFunctor); - problem.AddResidualBlock(cost_function, NULL, &x); + problem.AddResidualBlock(cost_function, nullptr, &x); // Run the solver! Solver::Options options;
diff --git a/include/ceres/autodiff_cost_function.h b/include/ceres/autodiff_cost_function.h index 5605e0b..5e6e9c5 100644 --- a/include/ceres/autodiff_cost_function.h +++ b/include/ceres/autodiff_cost_function.h
@@ -54,7 +54,7 @@ // for a series of measurements, where there is an instance of the cost function // for each measurement k. // -// The actual cost added to the total problem is e^2, or (k - x'k)^2; however, +// The actual cost added to the total problem is e^2, or (k - x'y)^2; however, // the squaring is implicitly done by the optimization framework. // // To write an auto-differentiable cost function for the above model, first