mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50: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:
@@ -142,6 +142,8 @@ class AutoDiffFirstOrderFunction : public FirstOrderFunction {
|
||||
|
||||
int NumParameters() const override { return kNumParameters; }
|
||||
|
||||
const FirstOrderFunctor & functor() const { return *functor_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<FirstOrderFunctor> functor_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user