Addressed PR comments by @daniel-j-h and @oxidase

This commit is contained in:
Patrick Niklaus
2017-03-01 20:17:34 +00:00
committed by Patrick Niklaus
parent a901bda41e
commit 3f485ac09b
13 changed files with 24 additions and 82 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ std::vector<std::size_t> getEdgeIndex(const std::vector<RTreeLeaf> &edges)
// GetEdgesInBox is marked `const`, so we can't sort the array itself,
// instead we create an array of indexes and sort that instead.
std::vector<std::size_t> sorted_edge_indexes(edges.size(), 0);
std::iota(sorted_edge_indexes.begin(), sorted_edge_indexes.end(), 0); // fill with 1,2,3,...N
std::iota(sorted_edge_indexes.begin(), sorted_edge_indexes.end(), 0); // fill with 0,1,2,3,...N-1
// Now, sort that array based on the edges list, using the u/v node IDs
// as the sort condition