From 06611488e118e05609a5bcdffd5dd510f0bce713 Mon Sep 17 00:00:00 2001 From: Guy Blelloch Date: Sun, 25 Feb 2024 18:16:33 -0500 Subject: [PATCH] namespace fidling --- examples/helper/graph_utils.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/helper/graph_utils.h b/examples/helper/graph_utils.h index 31c334ae..dcaef705 100644 --- a/examples/helper/graph_utils.h +++ b/examples/helper/graph_utils.h @@ -4,7 +4,7 @@ #include #include -namespace delayed = parlay::delayed; +namespace delay = parlay::delayed; template struct graph_utils { @@ -30,10 +30,10 @@ struct graph_utils { // transpose a directed graph // i.e. generate the backward edges for every forward edges static graph transpose(const graph& G) { - auto pairs = delayed::flatten(parlay::tabulate(G.size(), [&] (vertex i) { - return delayed::map(G[i], [=] (auto ngh) { + auto pairs = parlay::delayed::flatten(parlay::tabulate(G.size(), [&] (vertex i) { + return parlay::delayed::map(G[i], [=] (auto ngh) { return std::pair(ngh, i);});})); - return group_by_index(delayed::to_sequence(pairs), G.size()); + return group_by_index(parlay::delayed::to_sequence(pairs), G.size()); } // symmetrize and remove self edges from a graph @@ -55,8 +55,9 @@ struct graph_utils { } static edges to_edges(const graph& G) { - return delayed::to_sequence(delayed::flatten(parlay::tabulate(G.size(), [&] (vertex u) { - return delayed::map(G[u], [=] (vertex v) {return std::pair(u,v);});}))); + return parlay::delayed::to_sequence( + parlay::delayed::flatten(parlay::tabulate(G.size(), [&] (vertex u) { + return parlay::delayed::map(G[u], [=] (vertex v) {return std::pair(u,v);});}))); } // adds random weights so (u,v) and (v,u) have same weight