Observation.connect#
- Observation.connect(v1: Vertex, v2: Vertex) None#
Attach this edge to a pair of vertices
- Parameters:
v1 (Vertex subclass) – start of the edge
v2 (Vertex subclass) – end of the edge
- Raises:
ValueError – either vertex has not been added to a graph, or the vertices belong to different graphs
TypeError – this edge is not an instance of the graph’s
Graph.edge_class
The edge connects vertices
v1andv2, and is added to the graph that those vertices belong to.Warning
Intended for an edge that is not yet part of a graph. The edge’s
v1andv2are overwritten without checking, so connecting an edge that is already in a graph leaves it referenced from its old vertices as well.Note
The vertices must already be added to the graph.
- Seealso:
Vertex.connect