-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
additional sparseJacobian
functions (new)
#677
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit confused that your more general code is not here but I guess that will be next PR..
/// Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph | ||
SpMat sparseJacobianEigen( | ||
const GaussianFactorGraph &gfg, const Ordering &ordering) { | ||
// TODO(gerry): eliminate copy/pasta by making GaussianFactorGraph version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you had done that already? Or is that "the next PR" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, I was under the impression that you wanted just the bare minimum thing needed for A->B, which is efficient code for returning an Eigen-sparse-matrix format jacobian?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'm more than happy to put that in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, my comment on the other PR was not that these more generic, copy/pasta avoiding functions were not useful, just that they should be inside gfg.h, and then used in a small header-only function for the Eigen version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I propose you merge this, then create a next PR with those utilities to get rid of copy/pasta. No sense in throwing away that work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
This replaces #610 to reduce commit- and diff- noise.
The purpose of this PR is to provide a convenience function for obtaining the sparse (augmented) Jacobian of a GaussianFactorGraph.
Note that, as it stands, 99% of this PR is copy-pasta from GaussianFactorGraph::sparseJacobian(). Although I would prefer to make a version that is more elegant, this is the original way Mandy/Fan's code was written and I guess we can do that in a future PR. I added a TODO.