diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-21 21:13:31 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-21 21:15:31 +0200 |
commit | 3974ff7e2dc645bb62284706f664168dc062ee98 (patch) | |
tree | 853604886f8ef331709f59919cec992ffcebaca9 | |
parent | efdba76e6fdbcbdf1ce1c217d3a35dfb9ade5f79 (diff) |
mark and document function isConnected() as static utility function
-rw-r--r-- | dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java b/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java index 077b317..6b517f5 100644 --- a/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java +++ b/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java @@ -72,7 +72,7 @@ public final class Combi { Combi combi = new Combi(path); } - /// check that graph is connected + /// utility function to check that a graph is connected /// /// If check fails, throw an unchecked exception, /// since it occurs at runtime and is unrecoverable. @@ -87,7 +87,7 @@ public final class Combi { /// @param g Graph to inspect /// @throws IllegalArgumentException /// https://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html - public void isConnected(Graph g) { + public static void isConnected(Graph g) { // collect all vertices in the graph Collection<Vertex> c = g.vertices(); |