Return a topological sort of the nodes in the graph.
A topological sort of the nodes in a graph.
List[Node]
Examples
>>> from graphical_models import DAG >>> g = DAG(arcs={(1, 2), (2, 3)}) >>> g.topological_sort [1, 2, 3]