Matching#

class Matching#

Bases: object

A Matching (i.e., a set of edges that do not share any nodes)

Methods:

dst(src)

Get the matched destination node for a source node

edge_for_dst(dst)

Get the matched edge for a destination node

edge_for_src(src)

Get the matched edge for a source node

edges()

Get a view of the matched edges

src(dst)

Get the matched source node for a destination node

dst(src)#

Get the matched destination node for a source node

Parameters:

src (NodeInput) – The source node

Returns:

The matched destination node if it exists

Return type:

Optional[Node]

edge_for_dst(dst)#

Get the matched edge for a destination node

Parameters:

dst (NodeInput) – The source node

Returns:

The matched edge if it exists

Return type:

Optional[Edge]

edge_for_src(src)#

Get the matched edge for a source node

Parameters:

src (NodeInput) – The source node

Returns:

The matched edge if it exists

Return type:

Optional[Edge]

edges()#

Get a view of the matched edges

Returns:

The edges in the matching

Return type:

Edges

src(dst)#

Get the matched source node for a destination node

Parameters:

dst (NodeInput) – The destination node

Returns:

The matched source node if it exists

Return type:

Optional[Node]