Dear all, I do not understand the behavior of the following code (this is not a minimal example, I tried to reproduce the problem on a minimal example but I could not...). I do not get why, when I purge the vertices and edges after filtering, the properties of the vertices are not consistent. Thanks for your help,_graph = gt.Graph(_originalGraph) original graph # <Graph object, directed, with 2775 vertices and 9341 edges at 0x313be50> train number # 112 filtered graph # <Graph object, directed, with 2663 vertices and 6307 edges, edges filtered by (<PropertyMap object with key type 'Edge' and value type 'bool', for Graph 0x313be50, at 0x2a3c750>, False), vertices filtered by (<PropertyMap object with key type 'Vertex' and value type 'bool', for Graph 0x313be50, at 0x2d62610>, False) at 0x313be50> train number # 0 purged graph # <Graph object, directed, with 2663 vertices and 6307 edges, edges filtered by (<PropertyMap object with key type 'Edge' and value type 'bool', for Graph 0x313be50, at 0x313bc50>, False), vertices filtered by (<PropertyMap object with key type 'Vertex' and value type 'bool', for Graph 0x313be50, at 0x313bb90>, False) at 0x313be50> train number # 109 _______________________________________________ graphtool mailing list [hidden email] http://lists.skewed.de/mailman/listinfo/graphtool 
Administrator

On 16.10.2014 12:03, Flavien Lambert wrote:
> Dear all, I do not understand the behavior of the following code (this > is not a minimal example, I tried to reproduce the problem on a > minimal example but I could not...). I do not get why, when I purge > the vertices and edges after filtering, the properties of the vertices > are not consistent. I cannot investigate further if I cannot reproduce the problem myself. Can't you just save the graph and the properties, together with the code you sent, so that it can be debugged? Best, Tiago  Tiago de Paula Peixoto <[hidden email]> _______________________________________________ graphtool mailing list [hidden email] http://lists.skewed.de/mailman/listinfo/graphtool signature.asc (836 bytes) Download Attachment

Tiago de Paula Peixoto <tiago@skewed.de> 
Hi everyone, I come back with my problem with purge but on a different perspective. It seems that there is really a weird thing going on (or I missed something which is highly possible). The code is the following :_graph.vertex_properties["_graphml_vertex_id"] = _name _graph.vertex_properties["location"] = _position _graph.edge_properties["_graphml_edge_id"] = _edgeName _graph.edge_properties["speed"] = _speed _graph.edge_properties["time"] = _time _graph.edge_properties["capacity"] = _capacity _graph.edge_properties["vehicles"] = _vehicles _graph Out[27]: <Graph object, directed, with 2622 vertices and 8765 edges at 0x1443a3d0> Starting from this graph, I extract the strongly connected component _sccFiltered = gt.GraphView(_graph, vfilt = topo.label_largest_component(_graph)) _scc = gt.Graph(_sccFiltered) _scc.purge_vertices() _scc.purge_edges() _scc Out[28]: <Graph object, directed, with 2554 vertices and 8689 edges, edges filtered by Now if I save the graph with _scc.vertex_properties['origin'] = _origin _scc.vertex_properties['destination'] = _destination _scc.vertex_properties["_graphml_vertex_id"] = _name _scc.vertex_properties["location"] = _position _scc.edge_properties["_graphml_edge_id"] = _edgeName _scc.edge_properties["speed"] = _speed _scc.edge_properties["time"] = _time _scc.edge_properties["capacity"] = _capacity _scc.edge_properties["vehicles"] = _vehicles On 16 October 2014 18:56, Tiago de Paula Peixoto <[hidden email]> wrote: On 16.10.2014 12:03, Flavien Lambert wrote: _______________________________________________ graphtool mailing list [hidden email] http://lists.skewed.de/mailman/listinfo/graphtool 
Free forum by Nabble  Edit this page 