Hi all,
We are three students from the IT University of Copenhagen who would like to implement a variety of greedy graph coloring algorithms[1] into NetworkX.
We have read the documentation[2] regarding testing and development (how we must fork, create feature branches, request code reviews, etc), and are currently getting familiar with the source and how other algorithms are implemented.
Our objective is to implement ~5 greedy coloring algorithms during the next few months. And we have a few questions on how to approach this using best practices in the community.
As a starting point, we are thinking about creating the folder networkx/algorithms/coloring which should contain the algorithms. Is this sensible or is there a better way to structure it?
Version-control-vise we will implement each of the algorithms in different branches of our fork, so they can be reviewed (and hopefully pulled into the trunk) separately. Are we missing anything here?
As for the algorithms themselves, we are considering the following approach. An algorithm takes a graph G as input, and returns a “colored” graph G’ whose nodes now each contain a color-attribute. Furthermore we would provide utility methods to return e.g. the number of colors used to color the graph.
We would love some feedback on how we should approach this project and whether our initial thoughts fits the practices of the community.
Kind regards,
Jan, Christian, & Henrik
Hi Aric, Moritz, and the rest of the NetworkX community,
We are still in the initial phase of researching greedy coloring algorithms. But to ensure that we follow the NetworkX practices, we have implemented the simple first-fit algorithm using maximum degree ordering.
Our implementation is online in our forked repository and can be found here (direct link: https://github.com/itu-sass-s2014/networkx/blob/greedy-coloring-max-degree-first/networkx/algorithms/coloring/maxdegree.py).
We would like to provide all 5 algorithms before we initiate a pull request (for code-review etc). But we would very much appreciate any feedback.