Skip to content
Snippets Groups Projects
Commit 230d2c53 authored by Peter Wagenhuber's avatar Peter Wagenhuber
Browse files

erster test fuer getallpaths -> ging schief

parent 5f0b02dc
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ public class Nloc {
return found;
}
private List<Channel> getModulesByName(List<String> names) {
public List<Channel> getModulesByName(List<String> names) {
List<Channel> ret = new ArrayList<Channel>();
for (String name : names) {
for (Channel ch : chanlist) {
......
......@@ -13,11 +13,18 @@ public class TestNloc {
Nloc nlS1 = new Nloc(getNlocS1());
Nloc nlS6 = new Nloc(getNlocS6());
//List<Channel> modPath = nlS1.getModulesByName(Arrays.asList("m2","d2","m1","f2","h1","m0","d1"));
List<List<Channel>> pathlist = nlS1.getAllPaths();
//List<Channel> desiredPath = nlS1.getDesiredPath(modPath, pathlist);
//printPath(desiredPath);
printPaths(pathlist);
}
public static void printPath(List<Channel> path) {
for (Channel ch : path) {
System.out.print("ID: " + ch.getID() + " ");
System.out.print(ch.getName() + " -> ");
}
System.out.println("");
}
......@@ -100,7 +107,7 @@ public class TestNloc {
d1.addChild(ch15);
ch15.addChild(s0);
return chanlist;
return chlist;
}
public static List<Channel> getNlocS6() {
......@@ -190,6 +197,6 @@ public class TestNloc {
m5.addChild(ch20);
ch20.addChild(s0);
return chanlist;
return chlist;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment