From 72d8e1cdb1e7cdfbd662892f2a04f9af792a9be7 Mon Sep 17 00:00:00 2001 From: Kuang Fangjun Date: Thu, 20 Sep 2018 22:52:39 +0800 Subject: [PATCH] Fix typos. Change-Id: I61296f42354eab797c55c1435ca46b3475b767e9 --- include/ceres/internal/autodiff.h | 4 ++-- include/ceres/internal/disable_warnings.h | 2 +- include/ceres/internal/fixed_array.h | 4 ++-- include/ceres/local_parameterization.h | 2 +- include/ceres/types.h | 6 +++--- internal/ceres/array_utils.h | 2 +- internal/ceres/autodiff_cost_function_benchmark.cc | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/ceres/internal/autodiff.h b/include/ceres/internal/autodiff.h index a863e3cc4..903c89bc9 100644 --- a/include/ceres/internal/autodiff.h +++ b/include/ceres/internal/autodiff.h @@ -57,7 +57,7 @@ // [ * ] // // Similar to the 2-parameter example for f described in jet.h, computing the -// jacobian dy/dx is done by substutiting a suitable jet object for x and all +// jacobian dy/dx is done by substituting a suitable jet object for x and all // intermediate steps of the computation of F. Since x is has 4 dimensions, use // a Jet. // @@ -151,7 +151,7 @@ namespace ceres { namespace internal { -// Extends src by a 1st order pertubation for every dimension and puts it in +// Extends src by a 1st order perturbation for every dimension and puts it in // dst. The size of src is N. Since this is also used for perturbations in // blocked arrays, offset is used to shift which part of the jet the // perturbation occurs. This is used to set up the extended x augmented by an diff --git a/include/ceres/internal/disable_warnings.h b/include/ceres/internal/disable_warnings.h index 094124f71..fd848feec 100644 --- a/include/ceres/internal/disable_warnings.h +++ b/include/ceres/internal/disable_warnings.h @@ -35,7 +35,7 @@ #ifdef _MSC_VER #pragma warning( push ) -// Disable the warning C4251 which is trigerred by stl classes in +// Disable the warning C4251 which is triggered by stl classes in // Ceres' public interface. To quote MSDN: "C4251 can be ignored " // "if you are deriving from a type in the Standard C++ Library" #pragma warning( disable : 4251 ) diff --git a/include/ceres/internal/fixed_array.h b/include/ceres/internal/fixed_array.h index dbfa8d074..dcb2acefa 100644 --- a/include/ceres/internal/fixed_array.h +++ b/include/ceres/internal/fixed_array.h @@ -90,7 +90,7 @@ class FixedArray { // REQUIRES: n >= 0 // Creates an array object that can store "n" elements. // - // FixedArray will not zero-initialiaze POD (simple) types like int, + // FixedArray will not zero-initialize POD (simple) types like int, // double, bool, etc. // Non-POD types will be default-initialized just like regular vectors or // arrays. @@ -131,7 +131,7 @@ class FixedArray { private: // Container to hold elements of type T. This is necessary to handle - // the case where T is a a (C-style) array. The size of InnerContainer + // the case where T is a (C-style) array. The size of InnerContainer // and T must be the same, otherwise callers' assumptions about use // of this code will be broken. struct InnerContainer { diff --git a/include/ceres/local_parameterization.h b/include/ceres/local_parameterization.h index fd13c0eae..5eed035dd 100644 --- a/include/ceres/local_parameterization.h +++ b/include/ceres/local_parameterization.h @@ -60,7 +60,7 @@ namespace ceres { // optimize over two dimensional vector delta in the tangent space at // that point and then "move" to the point x + delta, where the move // operation involves projecting back onto the sphere. Doing so -// removes a redundent dimension from the optimization, making it +// removes a redundant dimension from the optimization, making it // numerically more robust and efficient. // // More generally we can define a function diff --git a/include/ceres/types.h b/include/ceres/types.h index 23ec8f7e4..8e5da6aec 100644 --- a/include/ceres/types.h +++ b/include/ceres/types.h @@ -146,7 +146,7 @@ enum SparseLinearAlgebraLibraryType { // minimum degree ordering. SUITE_SPARSE, - // A lightweight replacment for SuiteSparse, which does not require + // A lightweight replacement for SuiteSparse, which does not require // a LAPACK/BLAS implementation. Consequently, its performance is // also a bit lower than SuiteSparse. CX_SPARSE, @@ -201,7 +201,7 @@ enum LineSearchDirectionType { // symmetric matrix but only N conditions are specified by the Secant // equation. The requirement that the Hessian approximation be positive // definite imposes another N additional constraints, but that still leaves - // remaining degrees-of-freedom. (L)BFGS methods uniquely deteremine the + // remaining degrees-of-freedom. (L)BFGS methods uniquely determine the // approximate Hessian by imposing the additional constraints that the // approximation at the next iteration must be the 'closest' to the current // approximation (the nature of how this proximity is measured is actually @@ -249,7 +249,7 @@ enum LineSearchDirectionType { BFGS, }; -// Nonliner conjugate gradient methods are a generalization of the +// Nonlinear conjugate gradient methods are a generalization of the // method of Conjugate Gradients for linear systems. The // generalization can be carried out in a number of different ways // leading to number of different rules for computing the search diff --git a/internal/ceres/array_utils.h b/internal/ceres/array_utils.h index baf112e71..1d55733b7 100644 --- a/internal/ceres/array_utils.h +++ b/internal/ceres/array_utils.h @@ -68,7 +68,7 @@ void AppendArrayToString(const int size, const double* x, std::string* result); // This routine takes an array of integer values, sorts and uniques // them and then maps each value in the array to its position in the -// sorted+uniqued array. By doing this, if there are are k unique +// sorted+uniqued array. By doing this, if there are k unique // values in the array, each value is replaced by an integer in the // range [0, k-1], while preserving their relative order. // diff --git a/internal/ceres/autodiff_cost_function_benchmark.cc b/internal/ceres/autodiff_cost_function_benchmark.cc index 943635445..b9c106e4b 100644 --- a/internal/ceres/autodiff_cost_function_benchmark.cc +++ b/internal/ceres/autodiff_cost_function_benchmark.cc @@ -56,7 +56,7 @@ struct Rat43CostFunctor { }; // Simple implementation of autodiff using Jets directly instead of -// going through the machineary of AutoDiffCostFunction, which does +// going through the machinery of AutoDiffCostFunction, which does // the same thing, but much more generically. class Rat43Automatic : public ceres::SizedCostFunction<1, 4> { public: