Site Search:

Digraph.java with dfs circle detection visual (with Dot language)



%3 16 16 17 17 16->17 15 15 17->15 15->16 0 0 1 1 0->1 2 2 0->2 1->2 3 3 1->3 2->3 4 4 2->4 3->4 5 5 3->5 4->5 6 6 4->6 19 19 19->19 5->6 7 7 5->7 6->7 8 8 6->8 7->5


Java output:





strict digraph {
16[color=red];
17[color=red];
15[color=red];
16->17;
0->1;
0->2;
17->15;
1->2;
1->3;
2->3;
2->4;
19->19;
3->4;
3->5;
4->5;
4->6;
5->6;
5->7;
6->7;
6->8;
7->5;
15->16;
}
number of points: 13
number of edges: 19
hasCircle = true

No comments:

Post a Comment