Endlich funktionierts richtig
This commit is contained in:
parent
9abf041eb2
commit
a61f866171
4 changed files with 77 additions and 25 deletions
|
|
@ -17,6 +17,8 @@ public class GraphAlgoComplexityTest {
|
|||
|
||||
for (int i = 30; i < 50; i+=1) {
|
||||
|
||||
/*
|
||||
|
||||
Graph<Integer> g = generateGraph(i);
|
||||
DumbGraphAlgorithm ga = new DumbGraphAlgorithm(g, g.getNodes().get(0));
|
||||
|
||||
|
|
@ -28,6 +30,8 @@ public class GraphAlgoComplexityTest {
|
|||
|
||||
System.out.println(i + "," + ga.getN() + "," + divN + "," + divN2 + "," + divN3);
|
||||
|
||||
*/
|
||||
|
||||
/////////////
|
||||
|
||||
Graph<Integer> g2 = generateGraph2(i);
|
||||
|
|
@ -35,7 +39,7 @@ public class GraphAlgoComplexityTest {
|
|||
|
||||
ga2.run();
|
||||
|
||||
List<Edge<Integer>> path = ga2.getPath(g2.getNodes().get(12));
|
||||
List<Edge<Integer>> path = ga2.getPath(g2.getNodes().get(2));
|
||||
for (Edge<Integer> edge : path) {
|
||||
System.out.println(edge.getNodeA().getValue().toString() + " " + edge.getNodeB().getValue().toString());
|
||||
}
|
||||
|
|
@ -79,6 +83,8 @@ public class GraphAlgoComplexityTest {
|
|||
g.addEdge(nodes.get(i), nodes.get(i+1));
|
||||
}
|
||||
|
||||
g.addEdge(nodes.get(6), nodes.get(9));
|
||||
|
||||
return g;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue