From 43df5fcfd5d749642a4f420ea5d55d9f8310d690 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Fri, 29 May 2020 17:39:21 +0100 Subject: [PATCH] Remove some currently unused methods (mean, variance, etc.) from Distribution. Currently these do not actually make much sense anyway since the class is primarily intended to store distributions over indices into some other list (e.g., states). --- prism/src/explicit/Distribution.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/prism/src/explicit/Distribution.java b/prism/src/explicit/Distribution.java index 01df3efb..dfb0b2d8 100644 --- a/prism/src/explicit/Distribution.java +++ b/prism/src/explicit/Distribution.java @@ -29,7 +29,6 @@ package explicit; import java.util.BitSet; import java.util.HashMap; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -205,7 +204,7 @@ public class Distribution implements Iterable> /** * Get the mean of the distribution. */ - public double mean() + /*public double mean() { double d = 0.0; Iterator> i = iterator(); @@ -214,12 +213,12 @@ public class Distribution implements Iterable> d += e.getValue() * e.getKey(); } return d; - } + }*/ /** * Get the variance of the distribution. */ - public double variance() + /*public double variance() { double mean = mean(); double meanSq = 0.0; @@ -229,24 +228,24 @@ public class Distribution implements Iterable> meanSq += e.getValue() * e.getKey() * e.getKey(); } return Math.abs(meanSq - mean * mean); - } + }*/ /** * Get the standard deviation of the distribution. */ - public double standardDeviation() + /*public double standardDeviation() { return Math.sqrt(variance()); - } + }*/ /** * Get the relative standard deviation of the distribution, * i.e., as a percentage of the mean. */ - public double standardDeviationRelative() + /*public double standardDeviationRelative() { return 100.0 * standardDeviation() / mean(); - } + }*/ /** * Get the sum of the probabilities in the distribution.