Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lonestar/analytics/distributed/triangle-counting/tc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ struct TC {
Graph::edge_iterator vIterEnd = graph->edge_end(v);

for (auto wIter : graph->edges(w)) {
auto x = graph->getEdgeDst(wIter);
Graph::edge_iterator vvIter = vIterBeg;
while (graph->getEdgeDst(vvIter) < x && vvIter < vIterEnd) {
vvIter++;
}
auto x = graph->getEdgeDst(wIter);
auto vvIter = std::lower_bound(vIterBeg, vIterEnd, x,
[&](Graph::edge_iterator it, GNode x) {
return graph->getEdgeDst(it) < x;
});
if (vvIter < vIterEnd && x == graph->getEdgeDst(vvIter)) {
++numTriangles_local;
}
Expand Down