MixedGraph.mixedUnorientedPath
- MixedGraph.mixedUnorientedPath(node1, node2)
- Parameters:
node1 (
int) – the id from which the path beginsnode2 (
int) – the id to which the path ends
- Returns:
a path from node1 to node2, using edges and/or arcs (not necessarily following the direction of the arcs), or None if no path exists.
- Return type:
list[int]orNone
Example
import pyagrum as gum
g = gum.fastMixedGraph("A->B-C;D->C")
g.mixedUnorientedPath(0, 3) # the arcs are followed in any direction
# [0, 1, 2, 3]
Class
Overridden in