Site Search:

Graph.java that stores circles visual (with Dot language)





Java output:


strict graph {
0--1;
0--2;
1--0;
1--2;
1--3;
2--0;
2--1;
2--3;
2--4;
3--1;
3--2;
3--4;
3--5;
4--2;
4--3;
4--5;
4--6;
5--3;
5--4;
5--6;
5--7;
6--4;
6--5;
6--7;
6--8;
7--5;
7--6;
8--6;
15--16;
16--17;
16--15;
17--16;
19--19;
//======circle #0 ========
3--1[label=0, color=red,penwidth=2.0];
1--0[label=0, color=red,penwidth=2.0];
0--2[label=0, color=red,penwidth=2.0];
2--4[label=0, color=red,penwidth=2.0];
4--5[label=0, color=red,penwidth=2.0];
3--5[label=0, color=red,penwidth=2.0];
//======circle #1 ========
4--5[label=1, color=blue,penwidth=2.5];
5--6[label=1, color=blue,penwidth=2.5];
4--6[label=1, color=blue,penwidth=2.5];
//======circle #2 ========
5--6[label=2, color=green,penwidth=3.0];
6--7[label=2, color=green,penwidth=3.0];
5--7[label=2, color=green,penwidth=3.0];
//======circle #3 ========
1--0[label=3, color=purple,penwidth=3.5];
0--2[label=3, color=purple,penwidth=3.5];
1--2[label=3, color=purple,penwidth=3.5];
//======circle #4 ========
3--1[label=4, color=yellow,penwidth=4.0];
1--0[label=4, color=yellow,penwidth=4.0];
0--2[label=4, color=yellow,penwidth=4.0];
2--3[label=4, color=yellow,penwidth=4.0];
//======circle #5 ========
3--1[label=5, color=brown,penwidth=4.5];
1--0[label=5, color=brown,penwidth=4.5];
0--2[label=5, color=brown,penwidth=4.5];
2--4[label=5, color=brown,penwidth=4.5];
3--4[label=5, color=brown,penwidth=4.5];
//[Pair [a=3, b=5], Pair [a=4, b=6], Pair [a=5, b=7], Pair [a=1, b=2], Pair [a=2, b=3], Pair [a=3, b=4]]
}
number of points: 13
number of edges: 16
can we reach point 6 from 3: true
can we reach point 16 from 3: false
can we reach point 19 from 3: false
is there circle: true
how many circles dected for this traversal: 6