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

Jetzt geht das mit get all paths wieder

parent 230d2c53
No related branches found
No related tags found
No related merge requests found
......@@ -114,19 +114,11 @@ public class Channel extends NlocEntity implements Comparable<Channel> {
return parents;
}
public boolean isBifurcation() {
return children.size() > 1;
}
public boolean isTeeIntersect() {
return parents.size() > 1;
}
public int compareTo(Channel other) {
if (this.getPSteps() < other.getPSteps()) {
return -1;
} else if (this.getPSteps() == other.getPSteps()) {
return 0;
return this.getName().compareTo(other.getName());
} else {
return 1;
}
......
......@@ -13,6 +13,12 @@ public class TestNloc {
Nloc nlS1 = new Nloc(getNlocS1());
Nloc nlS6 = new Nloc(getNlocS6());
//Pump pum = nlS1.getPump();
//for (Channel ch: pum.getChildrenList()) {
// System.out.println("Child: " + ch.getName());
//}
//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);
......@@ -24,7 +30,11 @@ public class TestNloc {
public static void printPath(List<Channel> path) {
for (Channel ch : path) {
System.out.print(ch.getName() + " -> ");
if (ch instanceof Sink) {
System.out.print(ch.getName());
} else {
System.out.print(ch.getName() + " -> ");
}
}
System.out.println("");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment