TrackMatrix API
After #448 (closed) and #184 (closed).
Implementation of SnapshotConst TrackMatrix::snapshot(CaptureBaseConstPtr _capture) const
( and FeatureBaseConstPtrList TrackMatrix::snapshotAsList(CaptureBaseConstPtr _cap) const
that calls it) is not efficient.
The class could be improved by indexing snapshots by const pointers (CaptureConstPtr
) or by capture's id.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Joan Vallvé Navarro added To Do (future) label
added To Do (future) label
- Owner
I think the way to go is the following:
- Index snapshots by Capture ID
-
Add
TrackMatrix::trackIds()
-
Add
TrackMatrix::captureIds()
-
Remove
TrackMatrix::getTracks()
-
Remove
TrackMatrix::getSnapshots()
Edited by Joan Solà Ortega - Owner
I will start this job by adding to the API on a first stage.
- Joan Solà Ortega created branch
453-trackmatrix-api
to address this issuecreated branch
453-trackmatrix-api
to address this issue - Joan Solà Ortega mentioned in merge request !449 (merged)
mentioned in merge request !449 (merged)
- Owner
Although another way to go might be the following:
-
Index snapshots by
CaptureConstPtr
- Fix related API
-
Add
TrackMatrix::trackIds()
-
Add
TrackMatrix::snapshotCaps()
-
Remove
TrackMatrix::getTracks()
-
Remove
TrackMatrix::getSnapshots()
Edited by Joan Solà Ortega -
Index snapshots by
- Maintainer
Could we first merge a minimal version with the same API but with constness issues fixed? The point is that for the moment, this issue is blocking the merging of wolf_ros_vision. If the changes are too intricated, it's ok.
Edited by Mederic Fourmy Collapse replies - Owner
This is doable as a quick fix
- Owner
I think just the map<CaptureBasePtr, ...> should be changed to map<CaptureBaseConstPtr, ...>
- Owner
@mederic_fourmy if you want to go this way go ahead. Leave this issue open though
- Owner
The thing is, we do not like these two fncs added to the API
- getSnapshots()
- getTracks()
so they will be removed.
- Owner
Doing the full changes in the proposals above is not a big deal either, but we need to discuss it a bit and agree on a solution
- Owner
Final decision:
Only remove the following
-
getTracks()
-
getSnapshots()
The rest of issues are handled by the double API const / nonconst that is already pushed in
core
. -
- Joan Vallvé Navarro added Doing label
added Doing label
- Joan Vallvé Navarro removed To Do (future) label
removed To Do (future) label
- Joan Vallvé Navarro closed with merge request !449 (merged)
closed with merge request !449 (merged)
- Joan Vallvé Navarro mentioned in commit 627f138e
mentioned in commit 627f138e