Landmark.edgeto#
- Landmark.edgeto(dest: Vertex) Edge#
The edge from this vertex to an adjacent vertex
- Parameters:
dest (
Vertexsubclass) – an adjacent vertex- Raises:
ValueError –
destis not adjacent to this vertex- Returns:
the edge from this vertex to
dest- Return type:
Edge
Note
For a directed graph
destmust be at the arrow end of the edgeIf there are parallel edges to
destthe cheapest is returned (the first, if none of them has a cost)
>>> from pgraph import UGraph >>> g = UGraph() >>> v1 = g.add_vertex(coord=[0,0], name='v1') >>> v2 = g.add_vertex(coord=[1,1], name='v2') >>> g.add_edge(v1, v2, cost=1.414) Edge{[v1] -- [v2], cost=1.414} >>> print(v1.edgeto(v2)) Edge{[v1] -- [v2], cost=1.414}
- Seealso: