[Networkit] Scanning edges of a node in undirected/directed graphs

Elisabetta Bergamini elisabetta.bergamini at kit.edu
Tue Jun 2 16:01:11 CEST 2015

Dear NetworKit developers,

Does anybody know if there’s a reason why the order of the parameters in Graph.forInEdgesOf() and Graph.forEdgesOf() is different?
I mean, in Graph.forInEdgesOf(), the node on which the function is called is the second parameter (i.e., G.forInEdgesOf(u, [&](node v, node u){ … });), whereas in Graph.forEdgesOf() it is the first one (i.e., G.forEdgesOf(u, [&](node u, node v){ … });). I think it would be nicer if they were consistent, so that Graph.forInEdgesOf() could be used for both undirected and directed graphs without having to make distinctions in the code. Is there any reason why it has been designed this way?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150602/fc01add5/attachment.html>

More information about the NetworKit mailing list