From 97c94baa0140f9cbb26d8dd123432181e84a4bab Mon Sep 17 00:00:00 2001 From: marecabo <23156476+marecabo@users.noreply.github.com> Date: Fri, 1 Mar 2024 15:30:14 +0100 Subject: [PATCH 1/3] Add getter for totalWeight to WeightedRandomSelection --- .../matsim/contrib/common/util/WeightedRandomSelection.java | 4 ++++ 1 file changed, 4 insertions(+) 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; From c5a9204fa28ed480aab229d2428c1e2fef73c4f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:04:55 +0000 Subject: [PATCH 2/3] build(deps): bump org.mockito:mockito-core from 5.10.0 to 5.11.0 Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.10.0 to 5.11.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 68c3e2ed945..eb874831c9e 100644 --- a/pom.xml +++ b/pom.xml @@ -316,7 +316,7 @@ org.mockito mockito-core - 5.10.0 + 5.11.0 test From 76b4c72aec670ba836b54218e4742effc9824e84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:25:32 +0000 Subject: [PATCH 3/3] build(deps): bump org.mockito:mockito-junit-jupiter Bumps [org.mockito:mockito-junit-jupiter](https://github.com/mockito/mockito) from 5.10.0 to 5.11.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb874831c9e..1251711bfa6 100644 --- a/pom.xml +++ b/pom.xml @@ -322,7 +322,7 @@ org.mockito mockito-junit-jupiter - 5.10.0 + 5.11.0 test