On 01/09/2013 07:15 PM, Sirius Fuenmayor wrote: > I get a 'Segmentation fault (core dumped)' error when I try to calculate > the pseudo_diameter() of a GraphView object <class > 'graph_tool.GraphView'>. I must convert the GraphView object to a Graph > object <class 'graph_tool.Graph'> to perform this calculation? How do I > make this conversion?
The segfault is obviously a bug, I'll fix that. As a workaround, you can
convert a GraphView into a Graph instance by doing the following:
g = Graph(g, prune=True)
> Is there a more direct way to extract the components as graph objects?
You can do a little more compactly as Giuseppe showed, but as far as
actually efficiency is concerned, you cannot do much better.
Cheers,
Tiago
--
Tiago de Paula Peixoto <[email protected]>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list [email protected] http://lists.skewed.de/mailman/listinfo/graph-tool
