¡@

Home 

python Programming Glossary: lowlink

Tarjan's strongly connected components algorithm in python not working

http://stackoverflow.com/questions/6575058/tarjans-strongly-connected-components-algorithm-in-python-not-working

idx CCs c S idx v c c #idx v 0 for v.index # idx v 1 for v.lowlink c 1 S.append v for w in u for v2 u in E if v v2 if idx w 0 0.. itertools def strong_connect vertex global edges indices lowlinks connected_components index stack indices vertex index lowlinks.. connected_components index stack indices vertex index lowlinks vertex index index 1 stack.append vertex for v w in e for e..