mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
2a1dfd2b71
This adds a new wrapper class called DynamicCostFunctionToFunctor that closes a gap in the current API: the existing CostFunctionToFunctor can only be used with a SizedCostFunction, where the number and sizes of all parameter vectors are known at compile-time. The DynamicCostFunctionToFunctor allows you to wrap a generic CostFunction into a templated functor which can then be used in a DynamicAutoDiffCostFunction. Also updates the existing CostFunctionToFunctor class to internally use DynamicCostFunctionToFunctor. Change-Id: I088adc3271c58d2519126c27037c3576965a36d6