aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-28 11:14:39 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-28 11:14:39 +0200
commitc9ddf9ae9523a8ad3cbbd56c3677b945f4f86d92 (patch)
treeb6d22b3585c61dac1c4faef54ec92258393046f8
parentd114356dd5561a82d8b4c70809cd17437241f6b1 (diff)
fix function nonOverlapping()
-rw-r--r--src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java
index e985384..2095867 100644
--- a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java
+++ b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java
@@ -149,7 +149,6 @@ public final class Combi {
for (Vertex current : vip) {
if (done.contains(current)) {
-System.out.println("skipped: "+current.toString());
continue;
}
@@ -158,42 +157,14 @@ System.out.println("skipped: "+current.toString());
if (x == current)
return false;
Integer weight = g.getWeight(current, x);
-System.out.printf("weight from %s to %s: %d%n", current, x, weight);
- return weight != null && weight > 0;
+ return weight == null && !done.contains(x);
}).collect(Collectors.toSet());
-/*
- // add set of current and any unconnected modules
- Set<Vertex> isolated = all_set;
- isolated.removeIf(x -> {
- if (x == current)
- return false;
- Integer weight = g.getWeight(current, x);
-System.out.printf("weight from %s to %s: %d%n", current, x, weight);
- return weight != null && weight > 0;
- });
-*/
-
// add as set and omit from future iterations
sets.add(isolated);
done.addAll(isolated);
-System.out.println("isolated:");
-for (Vertex v: isolated) {
-System.out.println("\t"+v.toString());
-}
-
-//for (Vertex v: done) {
-//System.out.println("done: "+v.toString());
-//}
}
-for(Set<Vertex> s: sets) {
-System.out.println("set: "+s.size());
-for (Vertex v: s) {
-System.out.println(" "+v.toString());
-}
-}
-
return sets;
}
}