commit | 91773746be74a58029f6ecfc0c82a3b22492ed12 | [log] [tgz] |
---|---|---|
author | Sergiu Deitsch <sergiu.deitsch@gmail.com> | Sat Jun 10 21:01:25 2023 +0200 |
committer | Sergiu Deitsch <sergiu.deitsch@gmail.com> | Tue Jan 23 01:34:27 2024 +0100 |
tree | d044441ce11246a73c23a5245764a3bf59361c3b | |
parent | 8b88a9ab490292a08d537cab491bcb8fef186922 [diff] |
Simplify instantiation of cost functions and their functors If arguments are passed to a cost function that can be used to construct the functor, the latter will be instantiated by the cost function using std::make_unique to ensure exception safety. This not only avoids static analysis warnings caused by calling new but also spelling the cost functor type name multiple times. Also expand deduction guides for instantiating Dynamic(Auto|Numeric)DiffCostFunction from std::unique_ptr enabled constructor overloads. Finally, make CostFunction default move constructible and assignable but only through derived classes. This in turn allows derived classes to be movable without relying on custom implementations of corresponding operators. Change-Id: Idee8b9871d862bc9f9f8b5a8d0bedc52863e93c0
Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.
Please see ceres-solver.org for more information.