Landmark.connect#
- Landmark.connect(other, **kwargs)#
Connect two vertices with an edge
- Parameters:
dest (
Vertexsubclass) – The vertex to connect toedge (
Edgesubclass, optional) – Use this as the edge object, otherwise a newEdgeobject is created from the vertices being connected, and thecostandedgeparameters, defaults to Nonecost (float, optional) – the cost to traverse this edge, defaults to None
data (Any, optional) – reference to arbitrary data associated with the edge, defaults to None
- Raises:
TypeError – vertex types are different subclasses
- Returns:
the edge connecting the vertices
- Return type:
Edge
v1.connect(v2)connects vertexv1to vertexv2.Note
If the vertices subclass
UVertexthe edge is undirected, and if they subclassDVertexthe edge is directed.Vertices must both be of the same
Vertexsubclass
- Seealso:
Edge