techoe / ceres-solver

Automatically exported from code.google.com/p/ceres-solver
Other
0 stars 0 forks source link

Dynamic Autodiff should report the number of parameter blocks to the functor #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
- In the dynamic autodiff'd cost functor, it would be nice to have the number 
of parameters in the operator() argument. This information is here duplicated, 
while it is known by Ceres when calling AddParameterBlock on the 
DynamicAutoDiffCostFunction object. Moreover, the current situation forces the 
creation of as many functor objets as there are variations on the number of 
parameters (or worse, using dummy parameters), while if the number of 
parameters was available then only one functor would be needed. Something like :
  template<typename T> bool operator() (const std::vector<const* T>* parameters, T* residuals) const;
or, for free-style arrays:
  template<typename T> bool operator() (const int num_parameters, T const* const* parameters, T* residuals) const;

Original issue reported on code.google.com by sameerag...@google.com on 28 Apr 2013 at 12:15