Hello Claudio, Claudio Martella wrote: > Hello, > > I'm writing an application with heavy graph operations. It's written > in python, so i've tried networkx, igraph and lately i've tried to use > boost graph library bindings to python (BGL-PY). > > Thanks god i ran into graph-tool which looks very complete and also is > doing a transition into something very handy for me (python accessible > boost-based library).
Great. ;-) > I'm having a look at the API i found here: > http://projects.forked.de/graph-tool/doc/quickstart.html#creating-and-manipulating-graphs > > and i see i add vertices with g = Graph() g.add_vertices() and > calculate the betweeness centrality with > graph_tool.centrality.betweeness_centrality(). > > As i was looking for an implementation of a minimum spanning tree i > realized i couldn't find it in the reference i pointed a couple of > lines above. > > So i had a look at the graph_tool.py that uses the library and > realized that the interface is different there. > > Graph = GraphInterface() > Graph.GetBetweennessCentrality() or Graph.GetMinimumSpanningTree() > etc, and i cannot find any add_vertex() in this API. > > I'm a bit confused, so i'm trying to understand what i should use to > have full power over the graph-tool API. The minimum spanning tree code has not yet been ported to the new scheme, so it does not work at the moment. If you dig in the source code you will find the old code, but as you noticed it will not make much sense. Right now, you cannot really use it, sorry. :-( The interface from graph-tool with C++ (with the BGL) is also something I plan to document, so that it will be easy for people to write extensions. There is even a module called run_action which allows inline embedding of C++ code, which is automatically compiled and run (via scipy's weave). I'm currently finishing the documentation of the features which are implemented. I will then include more algorithms from BGL (such as minimum spanning tree, which is a high priority), which are relatively easy. I cannot promise any time schedule, but hopefully all this will be done soon, as I'm working at it regularly. I'll post something in this list when it is done. Cheers, Tiago
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool