NodeView#
- class NodeView(nodes)#
Bases:
Mapping,SetMapping/set-like view over the diagram’s nodes.
Keys are node identifiers (hashable), values are
Nodeinstances.Note
This is a view: it reflects the underlying diagram. Avoid mutating the diagram while iterating this view.
- Parameters:
nodes (dict[Hashable, Node])
- __init__(nodes)#
Create a view over the given node mapping.
- Parameters:
nodes (dict[Hashable, Node]) – Mapping from node id →
Nodeinstance.- Return type:
None
Methods
__init__(nodes)Create a view over the given node mapping.
arcs(node)Return the arcs emanating from a node.
get(k[,d])isdisjoint(other)Return True if two sets have a null intersection.
items()keys()values()- arcs(node)#
Return the arcs emanating from a node.
Each arc is returned as a pair
(adjacent_endpoint, endpoint).
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- isdisjoint(other)#
Return True if two sets have a null intersection.
- items() a set-like object providing a view on D's items#
- keys() a set-like object providing a view on D's keys#
- values() an object providing a view on D's values#