Commit Graph

5 Commits

Author SHA1 Message Date
Sameer Agarwal 0a53aa9054 Take abseil as a dependency
1. Add abseil-cpp as a submodule. We are tracking the latest LTS
release, which is lts_2024_01_16.
2. Replace glog/gflags with absl::log and absl::flags.
3. Remove miniglog
4. Also take a whack at making the bazel build work with
   abseil-cpp and gtest.

There are a number of TODOs in this CL that still need to be resolved.

Change-Id: I39355ed7d61375be4ebcbc8596d9cc70acc1c678
2024-07-18 00:24:49 -07:00
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
Sameer Agarwal 94335e3b9e More ClangTidy fixes
Change-Id: If7e056b0d2eddca581d87503340fdaac87adba86
2023-10-03 13:24:33 -07:00
Sameer Agarwal 0fc3fd4fce Add documentation for examples
Also remove random.h which is not used anymore.

Change-Id: I389a0fc0fd771619e179dcf305bb0991ad1d82ff
2023-09-28 14:45:18 -07:00
Sameer Agarwal 83ee376d86 Add an example for IterationCallback
iteration_callback_example.cc uses the curve_fitting.cc example
and uses a custom IterationCallback to log the values of the
parameter blocks are they change over the course of the optimization.

Change-Id: I6a478a8418e237aff576ca627d9b5c0b751b8088
2023-09-27 22:39:01 +00:00