aboutsummaryrefslogtreecommitdiff
path: root/src/dk.biks.bachelorizer/dk/biks/bachelorizer
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-28 15:32:50 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-28 15:32:50 +0200
commit67bfeadd996019799d9f254f3b0e87b3d3de175c (patch)
tree1962ff9c55d73107021edfa42d1e348a15ff05af /src/dk.biks.bachelorizer/dk/biks/bachelorizer
parentc1540cd35e9c908b0c66b40ffb8564b4167ade34 (diff)
rename function nonOverlapping() -> disjoint(), tidy comments
Diffstat (limited to 'src/dk.biks.bachelorizer/dk/biks/bachelorizer')
-rw-r--r--src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java
index 4ce7e02..6cde168 100644
--- a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java
+++ b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java
@@ -65,7 +65,7 @@ public final class Combi {
+" (otherwise an exception was thrown)");
// collect disjoint choice sets
- ArrayList<Set<Vertex>> s = nonOverlapping(g);
+ ArrayList<Set<Vertex>> s = disjoint(g);
System.out.printf(
"\n\n%d disjoint choice sets collected:\n",
s.size());
@@ -139,11 +139,11 @@ public final class Combi {
}
}
- /// groups of disjoint choices
+ /// sets of disjoint choices
///
/// @param g Graph to inspect
- /// @return list of non-overlapping sets
- public static ArrayList<Set<Vertex>> nonOverlapping(Graph g) {
+ /// @return list of disjoint sets
+ public static ArrayList<Set<Vertex>> disjoint(Graph g) {
// get all subject modules
//
@@ -151,7 +151,7 @@ public final class Combi {
List<Vertex> modules = new ArrayList<>(g.vertices());
Collections.shuffle(modules);
- return nonOverlapping(g, modules);
+ return disjoint(g, modules);
}
/// groups of disjoint choices seeded by priority list of choices
@@ -159,7 +159,7 @@ public final class Combi {
/// @param g Graph to inspect
/// @param vip Ordered list of subject modules to prioritize
/// @return List of sets of disjoint choices
- public static ArrayList<Set<Vertex>> nonOverlapping(Graph g, List<Vertex> vip) {
+ public static ArrayList<Set<Vertex>> disjoint(Graph g, List<Vertex> vip) {
ArrayList<Set<Vertex>> sets = new ArrayList<>();
// track done subject modules as extendable set
@@ -228,7 +228,7 @@ public final class Combi {
/// groups of disjoint module choices
///
- /// @param g groups of non-overlapping selections as a graph
+ /// @param g sets of disjoint choices as a graph
/// @return amount of students in consecutive slots
public static int solution(Graph g) {
@@ -240,7 +240,7 @@ public final class Combi {
/// groups of disjoint module choices seeded by start vertex
///
- /// @param g groups of non-overlapping selections as a graph
+ /// @param g groups of disjoint choices as a graph
/// @param v seed vertex within graph
/// @return amount of students in consecutive slots
public static int solution(Graph g, Vertex v) {