Commit Graph

7 Commits

Author SHA1 Message Date
Sergiu Deitsch 91773746be 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
2024-01-23 01:34:27 +01:00
Evan Levine f1414cb5bd Correct spelling in comments and docs.
Change-Id: Iad9a0599d644d3b3cd54244edaf64d408cb1308e
2022-04-24 21:40:13 -07:00
Sameer Agarwal 98719ced43 Fix a type in interfacing_with_autodiff.html
Thanks to @tangobravo for reporting this.

https://github.com/ceres-solver/ceres-solver/issues/701

Change-Id: I2b063267c9b501c698ce6cd439a666363ba16fde
2021-09-13 17:15:02 -07:00
Sameer Agarwal ab4ed32cda Replace NULL with nullptr in the documentation.
Change-Id: I995f68770e2a4b6027c0a1d3edf5eb5132b081d7
2020-08-03 04:18:05 -07:00
Kuang Fangjun 0d3a84fce5 Fix typos in doc and errors in the demo code.
Change-Id: I237402958ed8747ae438643132fcab90113ac27d
2018-09-22 12:01:20 +08:00
Sameer Agarwal 056d21d948 Fix a bunch of typos in the documentation.
Thanks William Rucklidge.

Change-Id: I3843f90897a61938a2641ef8fb43bcd3ec7796a1
2017-04-10 18:16:57 -07:00
Sameer Agarwal 7146d16dbf Add an article on interfacing with automatic differentiation.
Doing this also necessitated some re-organization of the derivatives
article into chapters and some minor edits.

Change-Id: Ic08e83af138817173caa80a52a9e72707cd57512
2017-03-26 12:47:57 -07:00