mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
6e8bd501b2
This extends the C API to support loss functions. Both user-supplied cost functions as well as the stock Ceres cost functions (Cauchy, Huber, etc) are supported. In addition, this adds a simple unit test for the C API. Supporting loss functions required changing the signature of the ceres_add_residual_block() function to also take a thunk for the loss function. Change-Id: Iefa58cf709adbb8f24588e5eb6aed9aef46b6d73