order the nodes of a digraph in topological (i.e. execution) order.
Definition at line 83 of file graphAlgs.py.
◆ __init__()
def graphAlgs.Topological.__init__ |
( |
|
self, |
|
|
|
G, |
|
|
|
roots = [] |
|
) |
| |
Definition at line 86 of file graphAlgs.py.
87 self.marked = [
False for i
in range(G.V)]
89 cycleFinder = DirectedCycle(G)
90 if not cycleFinder.has_cycle():
91 dfs = DepthFirstOrder(G, roots)
95 self.order_ = dfs.post()
◆ isDAG()
def graphAlgs.Topological.isDAG |
( |
|
self | ) |
|
Definition at line 100 of file graphAlgs.py.
101 return len(self.order_) != 0
◆ order()
def graphAlgs.Topological.order |
( |
|
self | ) |
|
◆ marked
graphAlgs.Topological.marked |
◆ order_
graphAlgs.Topological.order_ |
The documentation for this class was generated from the following file: