On 01/09/2013 10:29 PM, Tiago de Paula Peixoto wrote:
> 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)
>

The bug is now fixed in the git version.

As another workaround, you can do simply:

    pseudo_diameter(g, source=g.vertex(0, use_index=False))

This will also avoid the segfault.

Cheers,
Tiago


-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to