You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eigen does not initialize via default constructors (for performance reasons??). Instead, they provide initializer methods like Zero() and Identity().
Would it make sense to be consistent with this in Sophus and, for instance, have SO3::Identity(), SE3::Identity(), etc and not default initialize?
I can see this being a significant enough change to maybe have to be done during a major version increment since some users probably rely on this default initialization.
The text was updated successfully, but these errors were encountered:
I guess I was thinking about the situation where you have a std::vector of SE3d and want to resize() vs reserve()/push_back(). Afaik, you're forced to pass over and initialize all of the memory during the resize even if you plan on initializing with a loop after if your default constructor fully initializes.
I'd say reserve()/push_back() is clearly the better approach in general, since you don't have to worry about how expensive the default constructor is for a type Foo.
Eigen does not initialize via default constructors (for performance reasons??). Instead, they provide initializer methods like
Zero()
andIdentity()
.Would it make sense to be consistent with this in Sophus and, for instance, have
SO3::Identity()
,SE3::Identity()
, etc and not default initialize?I can see this being a significant enough change to maybe have to be done during a major version increment since some users probably rely on this default initialization.
The text was updated successfully, but these errors were encountered: