MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / edge_params

Function edge_params

scripts/debug/dump_hsgr.py:195–210  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

193 hsgr_edges = list(hsgr_edges)
194
195 def edge_params(e):
196 params = {
197 "label": e.weight,
198 "dir": "both", # not really, but enables arrowtail
199 # "constraint": "false",
200 }
201 if e.forward and e.backward:
202 params["arrowhead"] = "normal"
203 params["arrowtail"] = "dotnormal"
204 elif e.forward:
205 params["arrowhead"] = "normal"
206 params["arrowtail"] = "dot"
207 elif e.backward:
208 params["arrowhead"] = "none"
209 params["arrowtail"] = "dotnormal"
210 return params
211
212 def draw_edge(e, params, sub):
213 dot.write(f" {sub}{e.source}->{sub}{e.target}[{join(params)}];\n")

Callers 1

write_dot_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected