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
This commit is contained in:
Bayes Nie
2020-05-24 16:08:52 +08:00
committed by Sameer Agarwal
parent cca93fed63
commit 303b078b50
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ Why?
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 @@ Why?
* **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
+4 -3
View File
@@ -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 @@ int main(int argc, char** argv) {
// 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;
+1 -1
View File
@@ -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