| Module Info
| Add a review of Graph
i'm only in the beginning of using it, mainly for social network analysis.
it would be nice to have for analysis like degreeCentrality and betweenness the option to get normalized values.
Feature-rich, easy to use and well-documented. Highly recommended as a general graph module for perl.
I also thank the author for being extremely responsive in fixing the two issues below that came up for me:
1) Like reviewer abe, I initially found some basic functions (predecessors and successors) could be slow with large graphs. This is now fixed and I don't think that Graph's performance is a problem in general.
2) I also had an issue with deep_copy this was fixed quickly too.
I have found this module pretty useful and the documentation is great. It is very efficient for my purposes.
I fully recommend it if you want to safely handle graph objects.
Graph.pm vs Boost::Graph
This module was easy to get working quickly and it has a lot of features, but I ran into some problems.
- easy to use
- partially explained in "mastering algorithms with perl" (though this was misleading b/c in the book the object was a blessed hash but in the implementation, it is a blessed array, which made it a little inconvenient to subclass for my application).
- lots of features
- For my particular application, it was too slow. I couldn't tell from the documentation what particular algorithm/data structure it was using so I didn't know if it was so slow for me b/c of my mistake or b/c it wasn't efficient (my application was to do page rank on a graph of ~20,000 nodes, which pretty much only needs predecessor/successor functions, but if these are slow, then it gets bogged down b/c it needs to do many of these functions).
- being full of features and easy to use turned out to be a bit self-contradictory. Since I didn't need all the features it was a bit distracting and b/c of the speed issue, I had to pour over the documentation and dig through the code to try to figure what was going on. It turned out to be easier to change to the Boost::Graph module.
- I'm not sure how prevalent graphML is, but it would have been useful to dump the graph in this xml format.
I didn't need most of the features of this module, so I used Boost::Graph instead. The interface wasn't as intuitive (instead of successor() returning a list, it would return a list reference), but maybe that was just b/c I got use to Graph.pm first. the boost module has much less features, but it was much more fast. I invested a fair amount of time trying to speed it up, but to no avail. That being said, if the graph is small, you have "mastering algorithms with perl" (good book), or you need one of its particular features, you might still check it out. If you have a big graph and/or you need to subclass the graph, Boost::Graph might be better.
Nice module. In fact I didn't test half of it. Nor 10%. But it saved my day. And quite efficient!
The docs could do with being fleshed out a little...:)