diff --git a/contribs/common/src/main/java/org/matsim/contrib/common/util/WeightedRandomSelection.java b/contribs/common/src/main/java/org/matsim/contrib/common/util/WeightedRandomSelection.java index 6e305111108..148174d67af 100644 --- a/contribs/common/src/main/java/org/matsim/contrib/common/util/WeightedRandomSelection.java +++ b/contribs/common/src/main/java/org/matsim/contrib/common/util/WeightedRandomSelection.java @@ -67,6 +67,10 @@ public int size() { return entryList.size(); } + public double getTotalWeight() { + return totalWeight; + } + private record Entry(E e, double cumulativeWeight) implements Comparable> { public int compareTo(Entry o) { double diff = this.cumulativeWeight - o.cumulativeWeight; diff --git a/pom.xml b/pom.xml index 68c3e2ed945..1251711bfa6 100644 --- a/pom.xml +++ b/pom.xml @@ -316,13 +316,13 @@ org.mockito mockito-core - 5.10.0 + 5.11.0 test org.mockito mockito-junit-jupiter - 5.10.0 + 5.11.0 test