mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Add const accessor for functor wrapped by auto/numeric-diff objects
- The intended use-case for these accessors is in client code tests to support verification of the configuration with which cost functions were constructed. Change-Id: Ib77afa6409804ba7f724138f579e0c51b154f5ad
This commit is contained in:
@@ -215,6 +215,8 @@ class AutoDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {
|
||||
jacobians);
|
||||
};
|
||||
|
||||
const CostFunctor & functor() const { return *functor_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<CostFunctor> functor_;
|
||||
Ownership ownership_;
|
||||
|
||||
Reference in New Issue
Block a user