graphi.types.undirected module¶
-
class
graphi.types.undirected.
Undirected
(*source, **kwargs)¶ Bases:
graphi.abc.Graph
Wrapper to make
Graph
instances undirectedSee also
The
undirectable()
decorator forGraph
classes.-
clear
()¶ Remove all elements from this graph
-
edges
()¶ Return a new view of the graph’s edges
Returns: view of the graph’s edges Return type: UndirectedEdgeView
-
undirected
¶
-
update
(other)¶ Update the graph with the nodes, edges and values from
other
, overwriting existing elements.Parameters: other ( Graph
orItemView
) – graph or items from which to pull elements
-
values
()¶ Return a new view of the values of the graph’s edges
Returns: view of the values of the graph’s edges Return type: UndirectedValueView
-
-
class
graphi.types.undirected.
UndirectedEdge
(start, stop, step=None)¶ Bases:
graphi.edge.Edge
An undirected edge as a pair of nodes
For any nodes
a
andb
, theUndirectedEdge
sa:b
andb:a
are equivalent. As a result, which of the two isstart
orstop
is arbitrary but well-defined.
-
class
graphi.types.undirected.
UndirectedEdgeView
(graph)¶ Bases:
graphi.abc.EdgeView
View on the undirected edges in a graph
-
class
graphi.types.undirected.
UndirectedValueView
(graph)¶ Bases:
graphi.abc.ValueView
View on the values of undirected edges in a graph