Skip to content
Snippets Groups Projects
Commit 2e2762ac authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Polish

parent 03c02938
No related branches found
No related tags found
No related merge requests found
......@@ -34,13 +34,12 @@ else:
# assert input_suffix in {".gt", ".graphml"}
g = graph_tool.load_graph(sys.argv[1])
g.set_directed(False)
for v in g.vertices():
if g.vp.name[v] == int(sys.argv[2]): break
else:
sys.exit("Node not found")
g.set_directed(False)
label = topology.label_out_component(g, v)
g.set_vertex_filter(label)
g.purge_vertices()
......
#!/usr/bin/env python3
"""This script reads a graph of segments in graph-tool or graphml
format and creates the corresponding Graphviz file. If the graph has
cost values then the edges are labeled with them. If the option -t is
given then the label of each node tells which trajectory the segment
belongs to.
format and creates the corresponding Graphviz file. The node label is
the segment identifying number followed by the date index in
parentheses. If the graph has cost values then the edges are labeled
with them. If the option -t is given then the label of each node also
tells which trajectory the segment belongs to.
"""
......
......@@ -43,7 +43,8 @@ t0 = t1
# e_overestim is not used in this script but it is useful to save it
# to the output graph of this script for further processing of the
# output graph by other scripts:
# output graph by other scripts. We assume that e_overestim.txt is in
# the same directory as the input edgelist:
g.graph_properties["e_overestim"] = g.new_graph_property("int")
dir_edgelist = path.dirname(sys.argv[1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment