Support varying numbers of residuals in autodiff.

This commit modifies the only function in autodiff that takes a
templated number of outputs (i.e. residuals) and makes that
template parameter a normal parameter. With that change, it
is a trivial matter to support a dynamic number of residuals.

The API for dynamic residuals is to pass a fake number of
residuals as the second template argument to
AutoDiffCostFunction, and to pass the real number of
parameters as a second constructor argument.
6 files changed
tree: ab712e1ceee0e3c0c35a1c4b5cd9fa4ceb9d2de7
  1. data/
  2. docs/
  3. examples/
  4. include/
  5. internal/
  6. .gitignore
  7. CMakeLists.txt
  8. LICENSE
  9. README