| 54 | }; |
| 55 | |
| 56 | struct HashEntry |
| 57 | { |
| 58 | HashEntry() |
| 59 | { |
| 60 | indices.reserve(INITIAL_NUMBER_OF_INDICES); |
| 61 | } |
| 62 | |
| 63 | HashEntry(PointID const& id) |
| 64 | { |
| 65 | add(id); |
| 66 | } |
| 67 | |
| 68 | void add(PointID const& id) |
| 69 | { |
| 70 | indices.push_back(id); |
| 71 | } |
| 72 | |
| 73 | void erase(PointID const& id) |
| 74 | { |
| 75 | indices.erase(std::find(indices.begin(), indices.end(), id)); |
| 76 | } |
| 77 | |
| 78 | unsigned int n_indices() const |
| 79 | { |
| 80 | return static_cast<unsigned int>(indices.size()); |
| 81 | } |
| 82 | |
| 83 | std::vector<PointID> indices; |
| 84 | }; |
| 85 | |
| 86 | struct SpatialHasher |
| 87 | { |
nothing calls this directly
no outgoing calls
no test coverage detected