From Recitation: Euler paths, planar graphs, and Hamiltonian paths
Edge Classification
We have an edge e=(v,child)
, where v is always grey
Tree edge:
1
2if (child.color==white)
e = TreeEdge;Back edge:
1
2if (child.color==grey)
e = BackEdge;Forward edge:
1
2if (child.color==black && v.timeStamp<child.timeStamp)
e = ForwardEdge;Cross edge:
1
2if (child.color==black && v.timeStamp > child.timeStamp)
e = ForwardEdge;