Remove all dynamic-sized derivatives

Issue #150 resolved
Frank Dellaert created an issue

I'm proposing all functions be of the form

Y = f(X1,X2, boost::optional<Matrix26&> DX1, boost::optional<Matrix23&> DX2)

and all other versions disappear. Specifically, no more dynamic-sized derivatives.

However, boost::optional to fixed Eigen matrices might not be ideal. There is also Eigen::Ref, and if that could somehow be NULL that would be great. Our current factors also use dynamic Eigen optionals. Wondering whether there is some construct that could make that still work. A SuperRef that

  • initializes a dynamic to right size if a dynamic ref is given
  • does nothing if fixed size is given
  • throws if wrong size is given (is that what Eigen::ref does?)
  • allows a NULL value to be given
  • casts to bool like optional

@hannessommer @ptf any ideas?

Comments (6)

  1. Frank Dellaert reporter

    @nsrinivasan7

    @cbeall3 has already done a whole lot of GTSAM maintenance work, I was wondering whether you could quickly do this. I don't mean the SuperRef, just the changing from Matrix to Matrix23 etc... And only in geometry. It will likely break a number of factors and it has ripple effects, so definitely do in a branch and via pull request. I want this one fast, as it blocks moving factors.

  2. Log in to comment