ArcView#

class ArcView(nodes)#

Bases: NodeView

View over arcs (pairs of endpoints).

Parameters:

nodes (dict[Hashable, Node])

__init__(nodes)#

Create a view over the given node mapping.

Parameters:

nodes (dict[Hashable, Node]) – Mapping from node id → Node instance.

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).

Parameters:

node (Hashable) – Node identifier.

Returns:

list[tuple[Endpoint, Endpoint]] – List of arcs from the node.

Return type:

list[tuple[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#