mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-31 02:46:43 +00:00
Update Directed and Undirected (Weighted) Graph.py
This commit is contained in:
parent
c5c3a74f8f
commit
e22ea7e380
@ -152,6 +152,7 @@ class DirectedGraph:
|
|||||||
parent = -2
|
parent = -2
|
||||||
indirect_parents = []
|
indirect_parents = []
|
||||||
ss = s
|
ss = s
|
||||||
|
on_the_way_back = False
|
||||||
anticipating_nodes = set()
|
anticipating_nodes = set()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
@ -199,6 +200,7 @@ class DirectedGraph:
|
|||||||
parent = -2
|
parent = -2
|
||||||
indirect_parents = []
|
indirect_parents = []
|
||||||
ss = s
|
ss = s
|
||||||
|
on_the_way_back = False
|
||||||
anticipating_nodes = set()
|
anticipating_nodes = set()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
@ -367,6 +369,7 @@ class Graph:
|
|||||||
parent = -2
|
parent = -2
|
||||||
indirect_parents = []
|
indirect_parents = []
|
||||||
ss = s
|
ss = s
|
||||||
|
on_the_way_back = False
|
||||||
anticipating_nodes = set()
|
anticipating_nodes = set()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
@ -414,6 +417,7 @@ class Graph:
|
|||||||
parent = -2
|
parent = -2
|
||||||
indirect_parents = []
|
indirect_parents = []
|
||||||
ss = s
|
ss = s
|
||||||
|
on_the_way_back = False
|
||||||
anticipating_nodes = set()
|
anticipating_nodes = set()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user