![]() |
ATLAS Offline Software
|
Public Member Functions | |
| __init__ (self, G) | |
| has_cycle (self) | |
| cycle (self) | |
| dfs_ (self, G, v) | |
Public Attributes | |
| list | onStack = [False for i in range(G.V)] |
| list | marked = [False for i in range(G.V)] |
| list | edgeTo = [-1 for i in range(G.V)] |
| list | cycle_ = [] |
determine whether a digraph has a cycle
Definition at line 4 of file graphAlgs.py.
| graphAlgs.DirectedCycle.__init__ | ( | self, | |
| G ) |
Definition at line 7 of file graphAlgs.py.
| graphAlgs.DirectedCycle.cycle | ( | self | ) |
Definition at line 21 of file graphAlgs.py.
| graphAlgs.DirectedCycle.dfs_ | ( | self, | |
| G, | |||
| v ) |
Definition at line 24 of file graphAlgs.py.
| graphAlgs.DirectedCycle.has_cycle | ( | self | ) |
Definition at line 18 of file graphAlgs.py.
| graphAlgs.DirectedCycle.cycle_ = [] |
Definition at line 11 of file graphAlgs.py.
| list graphAlgs.DirectedCycle.edgeTo = [-1 for i in range(G.V)] |
Definition at line 10 of file graphAlgs.py.
| list graphAlgs.DirectedCycle.marked = [False for i in range(G.V)] |
Definition at line 9 of file graphAlgs.py.
| list graphAlgs.DirectedCycle.onStack = [False for i in range(G.V)] |
Definition at line 8 of file graphAlgs.py.