Skip to content

Commit

Permalink
censor results (cached or otherwise) greater than search radius
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwolf committed Jul 9, 2021
1 parent fc37202 commit 63f01ff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/accessibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,14 @@ Accessibility::Range(vector<long> srcnodes, float radius, int graphno,
vector<vector<pair<long, float>>> output(dists.size());
for (int i = 0; i < dists.size(); i++) {
output[i].resize(dists[i].size());
//int acc = 0;
for (int j = 0; j < dists[i].size(); j++) {
output[i][j] = std::make_pair(ext_ids[dists[i][j].first],
dists[i][j].second);
if (dists[i][j].second <= radius){
output[i][j] = std::make_pair(ext_ids[dists[i][j].first],
dists[i][j].second);
// acc += 1;
}
//output[i].resize(acc+1);
}
}
return output;
Expand Down

0 comments on commit 63f01ff

Please sign in to comment.