We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fc2d84c + 0406b2e commit eab961aCopy full SHA for eab961a
libgalois/include/galois/graphs/LS_LC_CSR_Graph.h
@@ -259,6 +259,20 @@ class LS_LC_CSR_Graph : private boost::noncopyable {
259
}
260
261
262
+ /*
263
+ * Iterates over the outgoing edges, calling the callback with the
264
+ * VertexTopologyID of each edge.
265
+ */
266
+ template <typename Callback>
267
+ void for_each_edge(VertexTopologyID vertex, Callback const& callback) {
268
+ auto const& vertex_meta = m_vertices[vertex];
269
+ EdgeMetadata const* begin =
270
+ &getEdgeMetadata(vertex_meta.buffer, vertex_meta.begin);
271
+ for (uint64_t i = 0; i < vertex_meta.degree(); ++i) {
272
+ callback(static_cast<VertexTopologyID>(*begin++));
273
+ }
274
275
+
276
/*
277
* Sort the outgoing edges for the given vertex.
278
*/
0 commit comments