[Networkit] Request for Comments: Efficient Set Operations on Graphs

Christian Staudt christian.staudt at kit.edu
Wed Nov 4 18:29:28 CET 2015

On 04 Nov 2015, at 11:32, Matteo Riondato <matteo at cs.brown.edu> wrote:

> One additional comment: are these operations modifying one of the two Graph object or are they creating a new Graph (I vote for this second option, new Graph). I’m asking because while union() and intersect() should create a new graph (in the same way that the set operation “create" a “new” set), append() is more ambiguous, and actually suggests that one of the Graph object is modified, but I would suggest some uniformity among these (or non-uniformity, my point is that it must be a motivated design choice).

That’s a good question. I think they should be modifiers on an existing graph, e.g. void Graph.append(Graph).  For my application, I want to extend a possibly already large graph G by adding small subgraphs. In this case, I do not want a copy of G enforced. For uniformity reasons, union and intersect should be modifiers too, right? If you want a new graph, you can always make a copy before applying the operation.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20151104/006f68c4/attachment.sig>

More information about the NetworKit mailing list