C++ classes used in walktrap community detection are in global namespace

Bug #1064678 reported by Christopher Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
igraph
Fix Released
Medium
Tamás Nepusz

Bug Description

The walktrap community detection algorithm uses classes that are in the global namespace. They should be in the igraph namespace, to avoid conflicts with users who wish to incorporate igraph into C++ projects. The 'Graph' class should also be renamed to not conflict with igraph::Graph as used by bliss.

A patch containing these changes is attached (tested on Ubuntu 10.04, igraph 0.6).

Tags: namespace
Revision history for this message
Christopher Lu (9e9o1ko8b2f5xpiibgscjzlhu-chris-0zxvj9hhx1hzo5xiyhxz186cr) wrote :
Revision history for this message
Tamás Nepusz (ntamas) wrote :

Thanks a lot for the patch! If Gabor has no objections, I will merge it in a few days or so.

Changed in igraph:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 0.6.1
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Thanks for the patch! I would actually prefer to leave the original walktrap code as intact as possible, because it is easier to update third party code, if they would come up with a new version. (This is probably not too important for walktrap because I already changes the code, and they most probably won't have a new version, but still.)

So I would create a walktrap namespace inside the igraph namespace, or put the whole thing in the igraph_walktrap namespace., instead of renaming the classes. Probably the first is better C++ practice.

Thanks again!

Revision history for this message
Tamás Nepusz (ntamas) wrote :

Merged to trunk in #3002 and to 0.6-main in #2966. (The walktrap classes are not part of the public API so we can do this).

Changed in igraph:
status: Confirmed → Fix Committed
assignee: nobody → Tamás Nepusz (ntamas)
Changed in igraph:
status: Fix Committed → Fix Released
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/239

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.