Return type of GaussianFactorGraph::hessianBlockDiagonal

Issue #72 new
Richard Roberts created an issue

The return type of this has two potential performance issues:

std::map<Key,Matrix> hessianBlockDiagonal() const
  • std::map can be slow - use FastMap instead (this is probably worth fixing for sure)
  • Matrix will use unnesessary space, perhaps use Vector instead since you're returning diagonals. You can then use Eigen functions to do calculations with the Vector interpreted as a matrix diagonal. I think it would be vector.asDiagonal(). (This may or may not be worth fixing now... perhaps just keep in mind when profiling in the future).

Comments (0)

  1. Log in to comment