For timing, if it goes in independently and passes tests,
no big deal one way or the other. Michael's in the middle
of refactoring the samplers, but those are orthogonal to
new functions and reimplemented vari.
1. I have no opinion about which GP components are usefully
reusable.
As far as coding it, we're working on more general vector views.
But however you code it, we can translate it into the new framework
when we get there.
2. As to saving the results of a solver, by all means. Ben's
been wanting to do something like this for ages.
I prefer a separate stack of things to free. Otherwise, it's
way too much overhead on top of auto-diff.
A virtual cleanup function is the elegant way to do this. It'll
have a bit of extra overhead from the virtual function call over
just saving a stack of pointers to free. Do we need the extra
generality? Or is it worth it just to have the interfaces be
cleaner?
I don't think we'll be able to finagle Eigen's solvers to use
our memory, for instance by using a placement new, because
they're bound to be doing lower-level allocation for internal
matrices.
- Bob