Fix broken C++ cross-references in Sphinx docs Add missing Sphinx C++ class and member declarations (including NumericDiffOptions, GradientProblemSolver, AutoDiffFirstOrderFunction, NumericDiffFirstOrderFunction, Grid1D, Grid2D, and MatrixAdapter), qualify unscoped member references, fix typos in class and option names, and enable nitpicky cross-reference checking in docs/source/conf.py. Change-Id: I7a5ee2e60a18f95e708b7a07237560249c75430d
diff --git a/docs/source/conf.py b/docs/source/conf.py index e620a80..e74cfac 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py
@@ -56,6 +56,32 @@ master_doc = 'index' exclude_patterns = [] pygments_style = 'sphinx' +nitpicky = True + +# Enum and typedef identifiers used in member/function declarations whose +# values are documented inline rather than in standalone directives. +nitpick_ignore = [ + ('cpp:identifier', 'Context'), + ('cpp:identifier', 'CovarianceAlgorithmType'), + ('cpp:identifier', 'DenseLinearAlgebraLibraryType'), + ('cpp:identifier', 'DoglegType'), + ('cpp:identifier', 'DumpFormatType'), + ('cpp:identifier', 'LineSearchDirectionType'), + ('cpp:identifier', 'LineSearchInterpolationType'), + ('cpp:identifier', 'LineSearchType'), + ('cpp:identifier', 'LinearSolverOrderingType'), + ('cpp:identifier', 'LinearSolverType'), + ('cpp:identifier', 'LoggingType'), + ('cpp:identifier', 'MinimizerType'), + ('cpp:identifier', 'NonlinearConjugateGradientType'), + ('cpp:identifier', 'Ownership'), + ('cpp:identifier', 'PreconditionerType'), + ('cpp:identifier', 'ResidualBlockId'), + ('cpp:identifier', 'SparseLinearAlgebraLibraryType'), + ('cpp:identifier', 'TerminationType'), + ('cpp:identifier', 'TrustRegionStrategyType'), + ('cpp:identifier', 'VisibilityClusteringType'), +] html_theme = 'sphinx_rtd_theme' html_title = 'Ceres Solver'
diff --git a/docs/source/gradient_solver.rst b/docs/source/gradient_solver.rst index abde99c..7deef3c 100644 --- a/docs/source/gradient_solver.rst +++ b/docs/source/gradient_solver.rst
@@ -45,6 +45,47 @@ Number of parameters in the domain of the function. +:class:`AutoDiffFirstOrderFunction` +----------------------------------- + +.. class:: AutoDiffFirstOrderFunction + + Creates :class:`FirstOrderFunction` instances with gradients computed via + automatic differentiation. To get an automatically differentiated function, + define a functor with a templated ``operator()`` that takes + ``const T* const parameters`` and writes the scalar objective to ``T* cost``. + + .. code-block:: c++ + + template <typename FirstOrderFunctor, int kNumParameters> + class AutoDiffFirstOrderFunction : public FirstOrderFunction { + public: + template <class... Args> + explicit AutoDiffFirstOrderFunction(Args&&... args); + explicit AutoDiffFirstOrderFunction( + std::unique_ptr<FirstOrderFunctor> functor); + explicit AutoDiffFirstOrderFunction(FirstOrderFunctor* functor, + Ownership ownership = TAKE_OWNERSHIP); + }; + + +:class:`NumericDiffFirstOrderFunction` +-------------------------------------- + +.. class:: NumericDiffFirstOrderFunction + + Creates :class:`FirstOrderFunction` instances with gradients computed via + numeric differentiation. The number of parameters can be specified either + at compile time or at runtime using ``DYNAMIC``. + + .. code-block:: c++ + + template <typename FirstOrderFunctor, + NumericDiffMethodType method = CENTRAL, + int kNumParameters = DYNAMIC> + class NumericDiffFirstOrderFunction : public FirstOrderFunction {}; + + :class:`GradientProblem` ------------------------ @@ -55,7 +96,7 @@ class GradientProblem { public: explicit GradientProblem(std::unique_ptr<FirstOrderFunction> function); - GradientProblem(std::unique_ptr<FirstOrderFunction function, + GradientProblem(std::unique_ptr<FirstOrderFunction> function, std::unique_ptr<Manifold> manifold); int NumParameters() const; int NumTangentParameters() const; @@ -85,15 +126,17 @@ :class:`Manifold` objects passed to it. +Solving +======= + +.. class:: GradientProblemSolver + .. function:: void Solve(const GradientProblemSolver::Options& options, const GradientProblem& problem, double* parameters, GradientProblemSolver::Summary* summary) Solve the given :class:`GradientProblem` using the values in ``parameters`` as the initial guess of the solution. -Solving -======= - :class:`GradientProblemSolver::Options` --------------------------------------- @@ -132,7 +175,7 @@ Choices are ``FLETCHER_REEVES``, ``POLAK_RIBIERE`` and ``HESTENES_STIEFEL``. -.. member:: int GradientProblemSolver::Options::max_lbfs_rank +.. member:: int GradientProblemSolver::Options::max_lbfgs_rank Default: 20 @@ -364,7 +407,7 @@ Default: ``false`` - By default the :class:`Minimizer` progress is logged to ``STDERR`` + By default the minimizer progress is logged to ``STDERR`` depending on the ``vlog`` level. If this flag is set to true, and :member:`GradientProblemSolver::Options::logging_type` is not ``SILENT``, the logging output is sent to ``STDOUT``. @@ -388,13 +431,13 @@ #. ``it`` is the time take by the current iteration. #. ``tt`` is the total time taken by the minimizer. -.. member:: std::vector<IterationCallback> GradientProblemSolver::Options::callbacks +.. member:: std::vector<IterationCallback*> GradientProblemSolver::Options::callbacks Callbacks that are executed at the end of each iteration of the - :class:`Minimizer`. They are executed in the order that they are + minimizer. They are executed in the order that they are specified in this vector. By default, parameter blocks are updated only at the end of the optimization, i.e., when the - :class:`Minimizer` terminates. This behavior is controlled by + minimizer terminates. This behavior is controlled by :member:`GradientProblemSolver::Options::update_state_every_iteration`. If the user wishes to have access to the update parameter blocks when his/her callbacks are executed, then set @@ -462,11 +505,11 @@ :class:`IterationSummary` for each minimizer iteration in order. -.. member:: int num_cost_evaluations +.. member:: int GradientProblemSolver::Summary::num_cost_evaluations Number of times the cost (and not the gradient) was evaluated. -.. member:: int num_gradient_evaluations +.. member:: int GradientProblemSolver::Summary::num_gradient_evaluations Number of times the gradient (and the cost) were evaluated.
diff --git a/docs/source/interfacing_with_autodiff.rst b/docs/source/interfacing_with_autodiff.rst index fa05835..5f24bdf 100644 --- a/docs/source/interfacing_with_autodiff.rst +++ b/docs/source/interfacing_with_autodiff.rst
@@ -165,7 +165,7 @@ 1. Wrap :code:`ComputeDistortionValueAndJacobian` into a :class:`CostFunction` object which we call :code:`ComputeDistortionFunction`. -2. Wrap the resulting :class:`ComputeDistortionFunction` object using +2. Wrap the resulting :code:`ComputeDistortionFunction` object using :class:`CostFunctionToFunctor`. The resulting object is a functor with a templated :code:`operator()` method, which pipes the Jacobian computed by :class:`NumericDiffCostFunction` into the
diff --git a/docs/source/nnls_modeling.rst b/docs/source/nnls_modeling.rst index bc2648b..f5a94532 100644 --- a/docs/source/nnls_modeling.rst +++ b/docs/source/nnls_modeling.rst
@@ -94,8 +94,8 @@ The signature of the :class:`CostFunction` (number and sizes of input parameter blocks and number of outputs) is stored in -:member:`CostFunction::parameter_block_sizes_` and -:member:`CostFunction::num_residuals_` respectively. User code +``CostFunction::parameter_block_sizes_`` and +``CostFunction::num_residuals_`` respectively. User code inheriting from this class is expected to set these two members with the corresponding accessors. This information will be verified by the :class:`Problem` when added with :func:`Problem::AddResidualBlock`. @@ -148,7 +148,7 @@ If the size of the parameter blocks and the size of the residual vector is known at compile time (this is the common case), - :class:`SizeCostFunction` can be used where these values can be + :class:`SizedCostFunction` can be used where these values can be specified as template parameters and the user only needs to implement :func:`CostFunction::Evaluate`. @@ -272,7 +272,7 @@ functor pointer passed to it, ie. will call `delete` on the cost functor when the :class:`AutoDiffCostFunction` itself is deleted. However, this may be undesirable in certain cases, therefore it is also possible to specify - :class:`DO_NOT_TAKE_OWNERSHIP` as a second argument in the constructor, + ``DO_NOT_TAKE_OWNERSHIP`` as a second argument in the constructor, while passing a pointer to a cost functor which does not need to be deleted by the AutoDiffCostFunction. For example: @@ -417,7 +417,7 @@ expectation for a series of measurements, where there is an instance of the cost function for each measurement :math:`k`. - To write an numerically-differentiable class:`CostFunction` for the + To write a numerically-differentiable :class:`CostFunction` for the above model, first define the object .. code-block:: c++ @@ -512,6 +512,47 @@ results, either try forward difference to improve performance or Ridders' method to improve accuracy. +.. class:: NumericDiffOptions + + Options pertaining to numeric differentiation (e.g., step sizes and + extrapolation parameters). + +.. member:: double NumericDiffOptions::relative_step_size + + Default: ``1e-6`` + + Numeric differentiation step size (multiplied by parameter block's order of + magnitude) for ``FORWARD`` and ``CENTRAL`` finite differences. If parameters + are close to zero, the step size is set to ``sqrt(machine_epsilon)``. + +.. member:: double NumericDiffOptions::ridders_relative_initial_step_size + + Default: ``1e-2`` + + Initial step size for ``RIDDERS`` adaptive numeric differentiation + (multiplied by parameter block's order of magnitude). If parameters are + close to zero, Ridders' method sets the step size directly to this value. + +.. member:: int NumericDiffOptions::max_num_ridders_extrapolations + + Default: ``10`` + + Maximal number of adaptive extrapolations (sampling) in Ridders' method. + +.. member:: double NumericDiffOptions::ridders_epsilon + + Default: ``1e-12`` + + Convergence criterion on extrapolation error for Ridders' adaptive + differentiation. + +.. member:: double NumericDiffOptions::ridders_step_shrink_factor + + Default: ``2.0`` + + The factor by which to shrink the step size with each extrapolation in + Ridders' method. + .. warning:: A common beginner's error when first using :class:`NumericDiffCostFunction` is to get the sizing wrong. In @@ -997,6 +1038,7 @@ virtual void Evaluate(double s, double out[3]) const = 0; }; +.. function:: void LossFunction::Evaluate(double s, double out[3]) const The key method is :func:`LossFunction::Evaluate`, which given a non-negative scalar ``s``, computes @@ -1373,15 +1415,15 @@ }; -.. function:: int Manifold::AmbientSize() const; +.. function:: int Manifold::AmbientSize() const Dimension of the ambient space in which the manifold is embedded. -.. function:: int Manifold::TangentSize() const; +.. function:: int Manifold::TangentSize() const Dimension of the manifold/tangent space. -.. function:: bool Plus(const double* x, const double* delta, double* x_plus_delta) const; +.. function:: bool Manifold::Plus(const double* x, const double* delta, double* x_plus_delta) const Implements the :math:`\boxplus(x,\Delta)` operation for the manifold. @@ -1395,7 +1437,7 @@ Return value indicates if the operation was successful or not. -.. function:: bool PlusJacobian(const double* x, double* jacobian) const; +.. function:: bool Manifold::PlusJacobian(const double* x, double* jacobian) const Compute the derivative of :math:`\boxplus(x, \Delta)` w.r.t :math:`\Delta` at :math:`\Delta = 0`, i.e. :math:`(D_2 @@ -1406,7 +1448,7 @@ Return value indicates whether the operation was successful or not. -.. function:: bool RightMultiplyByPlusJacobian(const double* x, const int num_rows, const double* ambient_matrix, double* tangent_matrix) const; +.. function:: bool Manifold::RightMultiplyByPlusJacobian(const double* x, const int num_rows, const double* ambient_matrix, double* tangent_matrix) const ``tangent_matrix`` = ``ambient_matrix`` :math:`\times` plus_jacobian. @@ -1429,7 +1471,7 @@ implementation for convenience. If performance becomes an issue then the user should consider implementing a specialization. -.. function:: bool Minus(const double* y, const double* x, double* y_minus_x) const; +.. function:: bool Manifold::Minus(const double* y, const double* x, double* y_minus_x) const Implements :math:`\boxminus(y,x)` operation for the manifold. @@ -1439,11 +1481,11 @@ ``y``. ``x`` and ``y`` are :func:`Manifold::AmbientSize` vectors. - ``y_minus_x`` is a ::func:`Manifold::TangentSize` vector. + ``y_minus_x`` is a :func:`Manifold::TangentSize` vector. Return value indicates if the operation was successful or not. -.. function:: bool MinusJacobian(const double* x, double* jacobian) const = 0; +.. function:: bool Manifold::MinusJacobian(const double* x, double* jacobian) const Compute the derivative of :math:`\boxminus(y, x)` w.r.t :math:`y` at :math:`y = x`, i.e :math:`(D_1 \boxminus) (x, x)`. @@ -1836,7 +1878,7 @@ :class:`Problem` holds the robustified bounds constrained non-linear least squares problem :eq:`ceresproblem_modeling`. To create a least squares problem, use the - :func:`Problem::AddResidalBlock` and + :func:`Problem::AddResidualBlock` and :func:`Problem::AddParameterBlock` methods. For example a problem containing 3 parameter blocks of sizes 3, 4 @@ -1880,7 +1922,7 @@ You can set any parameter block to be constant using :func:`Problem::SetParameterBlockConstant` and undo this using - :func:`SetParameterBlockVariable`. + :func:`Problem::SetParameterBlockVariable`. In fact you can set any number of parameter blocks to be constant, and Ceres is smart enough to figure out what part of the problem @@ -2021,7 +2063,7 @@ .. function:: ResidualBlockId Problem::AddResidualBlock(CostFunction* cost_function, LossFunction* loss_function, const std::vector<double*> parameter_blocks) -.. function:: template <typename Ts...> ResidualBlockId Problem::AddResidualBlock(CostFunction* cost_function, LossFunction* loss_function, double* x0, Ts... xs) +.. function:: template <typename... Ts> ResidualBlockId Problem::AddResidualBlock(CostFunction* cost_function, LossFunction* loss_function, double* x0, Ts... xs) Add a residual block to the overall cost function. The cost function carries with it information about the sizes of the @@ -2080,7 +2122,7 @@ Repeated calls with the same arguments are ignored. Repeated calls with the same double pointer but a different size results in a crash - (unless :member:`Solver::Options::disable_all_safety_checks` is set to true). + (unless :member:`Problem::Options::disable_all_safety_checks` is set to true). Repeated calls with the same double pointer and size but different :class:`Manifold` is equivalent to calling `SetManifold(manifold)`, @@ -2122,7 +2164,7 @@ Remove a parameter block from the problem. Any residual blocks that depend on the parameter are also removed, as described above in - :func:`RemoveResidualBlock()`. + :func:`Problem::RemoveResidualBlock`. The manifold of the parameter block, if it exists, will persist until the deletion of the problem. @@ -2152,7 +2194,7 @@ either by calling ``SetParameterBlockConstant`` or by associating a :class:`Manifold` with a zero dimensional tangent space with it. -.. function:: void SetManifold(double* values, Manifold* manifold); +.. function:: void Problem::SetManifold(double* values, Manifold* manifold) Set the :class:`Manifold` for the parameter block. Calling :func:`Problem::SetManifold` with ``nullptr`` will clear any @@ -2167,14 +2209,14 @@ It is acceptable to set the same :class:`Manifold` for multiple parameter blocks. -.. function:: const Manifold* GetManifold(const double* values) const; +.. function:: const Manifold* Problem::GetManifold(const double* values) const Get the :class:`Manifold` object associated with this parameter block. If there is no :class:`Manifold` object associated with the parameter block, then ``nullptr`` is returned. -.. function:: bool HasManifold(const double* values) const; +.. function:: bool Problem::HasManifold(const double* values) const Returns ``true`` if a :class:`Manifold` is associated with this parameter block, ``false`` otherwise. @@ -2274,7 +2316,7 @@ Get the :class:`LossFunction` for the given residual block. -.. function:: bool EvaluateResidualBlock(ResidualBlockId residual_block_id, bool apply_loss_function, double* cost,double* residuals, double** jacobians) const +.. function:: bool Problem::EvaluateResidualBlock(ResidualBlockId residual_block_id, bool apply_loss_function, double* cost, double* residuals, double** jacobians) const Evaluates the residual block, storing the scalar cost in ``cost``, the residual components in ``residuals``, and the jacobians between the @@ -2312,7 +2354,7 @@ :func:`Problem::EvaluateResidualBlockAssumingParametersUnchanged`. -.. function:: bool EvaluateResidualBlockAssumingParametersUnchanged(ResidualBlockId residual_block_id, bool apply_loss_function, double* cost,double* residuals, double** jacobians) const +.. function:: bool Problem::EvaluateResidualBlockAssumingParametersUnchanged(ResidualBlockId residual_block_id, bool apply_loss_function, double* cost, double* residuals, double** jacobians) const Same as :func:`Problem::EvaluateResidualBlock` except that if an :class:`EvaluationCallback` is associated with the problem, then @@ -2504,6 +2546,8 @@ functions. These functions are templated so that the user can use them within Ceres Solver's automatic differentiation framework. +.. class:: template <typename T, int row_stride = 1, int col_stride = 1> MatrixAdapter + .. function:: template <typename T> void AngleAxisToQuaternion(T const* angle_axis, T* quaternion) Convert a value in combined axis-angle representation to a @@ -2576,7 +2620,7 @@ such that :math:`\det(Q) = 1` and :math:`QQ' = I`. -.. function:: template <typename T> void QuaternionToRotation(const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R) +.. function:: template <typename T, int row_stride, int col_stride> void QuaternionToRotation(const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R) .. function:: template <typename T> void QuaternionToRotation(const T q[4], T R[3 * 3]) Same as above except that the rotation matrix is normalized by the @@ -2671,11 +2715,13 @@ interpolator.Evaluate(1.5, &f, &dfdx); -In the above code we use ``Grid1D`` a templated helper class that +.. class:: Grid1D + +In the above code we use :class:`Grid1D`, a templated helper class that allows easy interfacing between ``C++`` arrays and :class:`CubicInterpolator`. -``Grid1D`` supports vector valued functions where the various +:class:`Grid1D` supports vector valued functions where the various coordinates of the function can be interleaved or stacked. It also allows the use of any numeric type as input, as long as it can be safely cast to a double. @@ -2717,11 +2763,13 @@ double f, dfdr, dfdc; interpolator.Evaluate(1.2, 2.5, &f, &dfdr, &dfdc); -In the above code, the templated helper class ``Grid2D`` is used to +.. class:: Grid2D + +In the above code, the templated helper class :class:`Grid2D` is used to make a ``C++`` array look like a two dimensional table to :class:`BiCubicInterpolator`. -``Grid2D`` supports row or column major layouts. It also supports +:class:`Grid2D` supports row or column major layouts. It also supports vector valued functions where the individual coordinates of the function may be interleaved or stacked. It also allows the use of any numeric type as input, as long as it can be safely cast to double.
diff --git a/docs/source/nnls_solving.rst b/docs/source/nnls_solving.rst index 8e2b2d4..e24b92d 100644 --- a/docs/source/nnls_solving.rst +++ b/docs/source/nnls_solving.rst
@@ -1304,7 +1304,7 @@ low-sensitivity parameters. It can also reduce the robustness of the solution to errors in the Jacobians. -.. member:: LineSearchIterpolationType Solver::Options::line_search_interpolation_type +.. member:: LineSearchInterpolationType Solver::Options::line_search_interpolation_type Default: ``CUBIC`` @@ -1638,7 +1638,7 @@ If ``Solver::Options::preconditioner_type == SUBSET``, then ``residual_blocks_for_subset_preconditioner`` must be non-empty. -.. member:: DenseLinearAlgebraLibrary Solver::Options::dense_linear_algebra_library_type +.. member:: DenseLinearAlgebraLibraryType Solver::Options::dense_linear_algebra_library_type Default: ``EIGEN`` @@ -1655,7 +1655,7 @@ ``LAPACK + BLAS`` or ``CUDA`` implementation can make a substantial difference in performance. -.. member:: SparseLinearAlgebraLibrary Solver::Options::sparse_linear_algebra_library_type +.. member:: SparseLinearAlgebraLibraryType Solver::Options::sparse_linear_algebra_library_type Default: The highest available according to: ``SUITE_SPARSE`` > ``ACCELERATE_SPARSE`` > ``EIGEN_SPARSE`` > ``NO_SPARSE``
diff --git a/docs/source/nnls_tutorial.rst b/docs/source/nnls_tutorial.rst index a2be7de..36c56c6 100644 --- a/docs/source/nnls_tutorial.rst +++ b/docs/source/nnls_tutorial.rst
@@ -294,7 +294,7 @@ Ceres. Once you are comfortable with using :class:`NumericDiffCostFunction` and :class:`AutoDiffCostFunction` we recommend taking a look at :class:`DynamicAutoDiffCostFunction`, -:class:`CostFunctionToFunctor`, :class:`NumericDiffFunctor` and +:class:`CostFunctionToFunctor`, and :class:`ConditionedCostFunction` for more advanced ways of constructing and computing cost functions. @@ -887,16 +887,16 @@ Lastly, we use a manifold to normalize the orientation in the range :math:`[-\pi,\pi)`. Specially, we define the - :member:`AngleManifold::Plus()` function to be: + ``AngleManifold::Plus()`` function to be: :math:`\mathrm{Normalize}(\psi + \Delta)` and - :member:`AngleManifold::Minus()` function to be + ``AngleManifold::Minus()`` function to be :math:`\mathrm{Normalize}(y) - \mathrm{Normalize}(x)`. - This package includes an executable :member:`pose_graph_2d` that will read a + This package includes an executable ``pose_graph_2d`` that will read a problem definition file. This executable can work with any 2D problem definition that uses the g2o format. It would be relatively straightforward to implement a new reader for a different format such as TORO or - others. :member:`pose_graph_2d` will print the Ceres solver full summary and + others. ``pose_graph_2d`` will print the Ceres solver full summary and then output to disk the original and optimized poses (``poses_original.txt`` and ``poses_optimized.txt``, respectively) of the robot in the following format: @@ -911,7 +911,7 @@ definition. Note, the file will be sorted in ascending order for the ``pose_id``. - The executable :member:`pose_graph_2d` expects the first argument to be + The executable ``pose_graph_2d`` expects the first argument to be the path to the problem definition. To run the executable, .. code-block:: bash @@ -994,11 +994,11 @@ parameter blocks which are raw double pointers this difference is important and requires a different parameterization. - This package includes an executable :member:`pose_graph_3d` that will read a + This package includes an executable ``pose_graph_3d`` that will read a problem definition file. This executable can work with any 3D problem definition that uses the g2o format with quaternions used for the orientation representation. It would be relatively straightforward to implement a new - reader for a different format such as TORO or others. :member:`pose_graph_3d` + reader for a different format such as TORO or others. ``pose_graph_3d`` will print the Ceres solver full summary and then output to disk the original and optimized poses (``poses_original.txt`` and ``poses_optimized.txt``, respectively) of the robot in the following format: @@ -1014,7 +1014,7 @@ definition. Note, the file will be sorted in ascending order for the ``pose_id``. - The executable :member:`pose_graph_3d` expects the first argument to be the + The executable ``pose_graph_3d`` expects the first argument to be the path to the problem definition. The executable can be run via .. code-block:: bash
diff --git a/docs/source/version_history.rst b/docs/source/version_history.rst index a987a6b..2b332db 100644 --- a/docs/source/version_history.rst +++ b/docs/source/version_history.rst
@@ -29,14 +29,14 @@ two-argument norms. (Sergiu Deitsch) #. Simplify instantiation of cost functions and their functors by forwarding functor constructor arguments directly, and add ``std::unique_ptr`` and - :enum:`Ownership` constructors across cost and first-order functions. + ``Ownership`` constructors across cost and first-order functions. (Sergiu Deitsch & Sameer Agarwal) #. Add support for maximum matrix sizes (``kMaxResiduals`` and - ``kMaxParameters``) to :class:`TinySolver`, - :class:`TinySolverAutoDiffFunction`, and - :class:`TinySolverCostFunctionAdapter` to support zero dynamic memory + ``kMaxParameters``) to ``TinySolver``, + ``TinySolverAutoDiffFunction``, and + ``TinySolverCostFunctionAdapter`` to support zero dynamic memory allocation when dimensions are ``Eigen::Dynamic``. (Pez Firoozfam) -#. Add ``Residuals()`` and ``Jacobian()`` getters to :class:`TinySolver`. +#. Add ``Residuals()`` and ``Jacobian()`` getters to ``TinySolver``. (connorlee77) #. Do not restrict :class:`Grid1D` and :class:`Grid2D` output to ``double``. (Sergiu Deitsch) @@ -47,7 +47,7 @@ :class:`QuaternionManifold` and :class:`EigenQuaternionManifold`. (Sergiu Deitsch) #. Provide ``Eigen::NumTraits`` ``quiet_NaN`` and ``infinity`` for - :class:`Jet`. (Sergiu Deitsch) + ``Jet``. (Sergiu Deitsch) #. Move C++17 Bessel functions availability checks from configuration time to inclusion time, with fallback to POSIX implementations on ``libc++``. (Sergiu Deitsch) @@ -202,7 +202,7 @@ Backward Incompatible API Changes --------------------------------- -#. :class:`LocalParameterization` has been removed, use +#. ``LocalParameterization`` has been removed, use :class:`Manifold` instead. #. Ceres Solver now requires a C++17 compliant compiler. #. Ceres Solver now requires CMake version 3.16 or later. @@ -296,7 +296,7 @@ #. Improve the code in small_blas to be more compiler friendly (Sameer Agarwal) #. Add the ability to specify the pivot threshold in - ::class::`Covariance::Options` (Sameer Agarwal) + :class:`Covariance::Options` (Sameer Agarwal) #. Modernize the internals to use C++17 (Sameer Agarwal) #. Choose SPMV algorithm based on the CUDA SDK Version (Joydeep Biswas) @@ -336,17 +336,17 @@ Agarwal) #. :class:`Manifold` is the new - :class:`LocalParameterization`. Version 2.1 is the transition - release where users can use both :class:`LocalParameterization` as + ``LocalParameterization``. Version 2.1 is the transition + release where users can use both ``LocalParameterization`` as well as :class:`Manifold` objects as they transition from the - former to the latter. :class:`LocalParameterization` will be + former to the latter. ``LocalParameterization`` will be removed in version 2.2. There should be no numerical change to the results as a result of this change. (Sameer Agarwal, Johannes Beck, Sergiu Deitsch) -#. A number of changes to :class:`Jet` s (Sergiu Deitsch) +#. A number of changes to ``Jet`` s (Sergiu Deitsch) - * :class:`Jet` gained support for, ``copysign``, ``fma`` (fused + * ``Jet`` gained support for, ``copysign``, ``fma`` (fused multiply-add), ``midpoint`` (C++20 and above), ``lerp`` (C++20 and above), 3-argument ``hypot`` (C++17 and above), ``log10``, ``log1p``, ``exp1m``, ``norm`` (squared :math:`L^2` norm). @@ -360,8 +360,8 @@ ``isinf``, ``isnormal``, ``isfinite``, ``fpclassify`` (new), ``fmin``, ``fmax`` - * It is now possible to safely compare a :class:`Jet` against a scalar - (or literal) without constructing a :class:`Jet` first (even if it's + * It is now possible to safely compare a ``Jet`` against a scalar + (or literal) without constructing a ``Jet`` first (even if it's nested): .. code-block:: c++ @@ -380,13 +380,13 @@ Backward Incompatible API Changes --------------------------------- -#. :class:`LocalParameterization` is deprecated. It will be removed in +#. ``LocalParameterization`` is deprecated. It will be removed in version 2.2. Use :class:`Manifold` instead. #. Classification functions like ``IsFinite`` are deprecated. Use the ``C++11`` functions (``isfinite``, ``isnan`` etc) going forward. However to maintain consistent behaviour with comparison operators, these functions only inspect the scalar part of the - :class:`Jet`. + ``Jet``. Bug Fixes & Minor Changes ------------------------- @@ -490,7 +490,7 @@ version >= 3.3 & CMake version >= 3.5, XCode version >= 11.2 (Sameer Agarwal, Alex Stewart & Keir Mierle) #. C++ threading based multi-threading support. (Mike Vitus) -#. :func:`Problem::AddResidualBlock`, :class:`SizedFunction`, +#. :func:`Problem::AddResidualBlock`, :class:`SizedCostFunction`, :class:`AutoDiffCostFunction`, :class:`NumericDiffCostFunction` support an arbitrary number of parameter blocks using variadic templates (Johannes Beck) @@ -546,7 +546,7 @@ #. Huge number of build system simplification & cleanups (Alex Stewart, NeroBurner, Alastair Harrison, Linus Mårtensson, Nikolaus Demmel) #. Intel TBB based threading removed (Mike Vitus) -#. Allow :class:`SubsetParameterization` to accept an empty vector of +#. Allow ``SubsetParameterization`` to accept an empty vector of constant parameters. (Sameer Agarwal & Frédéric Devernay) #. Fix a bug in DynamicAutoDiffCostFunction when all parameters are constant (Ky Waegel & Sameer Agarwal)