| 127 | } |
| 128 | |
| 129 | std::vector<frame_t> FeatureMatcherCache::GetFrameIds() { |
| 130 | MaybeLoadFrames(); |
| 131 | |
| 132 | std::vector<frame_t> frame_ids; |
| 133 | frame_ids.reserve(frames_cache_->size()); |
| 134 | for (const auto& frame : *frames_cache_) { |
| 135 | frame_ids.push_back(frame.first); |
| 136 | } |
| 137 | // Sort the frames for deterministic behavior. Note that the frames_cache_ is |
| 138 | // an unordered_map, which does not guarantee a deterministic order across |
| 139 | // different standard library implementations. |
| 140 | std::sort(frame_ids.begin(), frame_ids.end()); |
| 141 | return frame_ids; |
| 142 | } |
| 143 | |
| 144 | std::vector<image_t> FeatureMatcherCache::GetImageIds() { |
| 145 | MaybeLoadImages(); |