aboutsummaryrefslogtreecommitdiff
path: root/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java')
-rw-r--r--src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java
index 5ac0971..e79c80d 100644
--- a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java
+++ b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java
@@ -273,11 +273,21 @@ public final class Graph extends Storage {
/// @return total weight of random path and its seed as array
private static long[] solve(final AbstractGraph g) {
+ return solve(g, System.currentTimeMillis());
+ }
+
+ /// find total weight of path through disjoint choice sets
+ ///
+ /// @param g sets of disjoint choices as a graph
+ /// @param seed randomizing seed for shuffling path
+ /// @return total weight of random path and its seed as array
+ private static long[] solve(final AbstractGraph g, long seed) {
+
/// parameters for solution
long[] solution = new long[] {0, 0};
List<Vertex> path = new ArrayList<>(g.vertices());
- solution[1] = System.currentTimeMillis();
+ solution[1] = seed;
Random random = new Random(solution[1]);
// order of list contents becomes path order