On 05/29/2014 03:43 PM, Flavien Lambert wrote:
> Hi, is there a way to get the key 'id' of edges in the spirit of the vertices 
> one like the following? _vertexIds works but not _edgeIds.
>
> g=load_graph(dataFolder+'networkFullyConnected.xml')
> _vertexIds = g.vertex_properties["_graphml_vertex_id"]
> _edgeIds = g.edge_properties["_graphml_edge_id"]

The edge property will be there if the edge labeling in the file is not
canonical. I.e., if in the beginning of the file you have something like

    <graph id="G" edgedefault="undirected" parse.nodeids="canonical" 
parse.edgeids="canonical" parse.order="nodesfirst">

that means that both the edge and node ids are canonical, and in that
case the properties will not be available.

I've tested with non-canonical labellings and I see both properties. If
you see otherwise, please provide a short example.

Best,
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