From 67bfeadd996019799d9f254f3b0e87b3d3de175c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 28 Apr 2025 15:32:50 +0200 Subject: rename function nonOverlapping() -> disjoint(), tidy comments --- src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/dk.biks.bachelorizer/dk/biks/bachelorizer/Combi.java') 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> s = nonOverlapping(g); + ArrayList> 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> nonOverlapping(Graph g) { + /// @return list of disjoint sets + public static ArrayList> disjoint(Graph g) { // get all subject modules // @@ -151,7 +151,7 @@ public final class Combi { List 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> nonOverlapping(Graph g, List vip) { + public static ArrayList> disjoint(Graph g, List vip) { ArrayList> 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) { -- cgit v1.2.3