diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-21 22:43:43 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-21 23:13:55 +0200 |
commit | 5e2c06036d31ed97aef027902853c57b23a23d59 (patch) | |
tree | 8ee059afcdd6244839437eab490f48fa7003be68 | |
parent | 3974ff7e2dc645bb62284706f664168dc062ee98 (diff) |
improve complexity documentation
-rw-r--r-- | dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java b/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java index 6b517f5..1c86e7d 100644 --- a/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java +++ b/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/model/Combi.java @@ -77,12 +77,9 @@ public final class Combi { /// If check fails, throw an unchecked exception, /// since it occurs at runtime and is unrecoverable. /// - /// Complexity of the operation is O(min(2n,n²,n*m+1)) - /// where n is the amount of vertices and m is amount of edges, - /// since visitDepthFirst() recurses out-edges of all vertices, - /// and a connected graph has at least one out-edge per vertex - /// (arguably complexity is merely O(2n,n²) - /// since an unconnected graph is treated an as exception). + /// Time complexity of the operation is O(n²) + /// where n is the amount of vertices, + /// since visitDepthFirst() recurses out-edges of all vertices. /// /// @param g Graph to inspect /// @throws IllegalArgumentException |