File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/org/cicirello/math/stats Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2018-2020 Vincent A. Cicirello, <https://www.cicirello.org/>.
2+ * Copyright 2018-2021 Vincent A. Cicirello, <https://www.cicirello.org/>.
33 *
44 * This file is part of JavaPermutationTools (https://jpt.cicirello.org/).
55 *
2626 * Utility class of basic statistics.
2727 *
2828 * @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>, <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
29- * @version 09-18-2020
29+ * @version 5.13.2021
3030 */
3131public final class Statistics {
3232
@@ -39,11 +39,9 @@ private Statistics() {}
3939 * @return the mean of the data.
4040 */
4141 public static double mean (int [] data ) {
42- double mean = 0 ;
4342 int sum = 0 ;
4443 for (int e : data ) sum = sum + e ;
45- mean = 1.0 * sum / data .length ;
46- return mean ;
44+ return 1.0 * sum / data .length ;
4745 }
4846
4947 /**
You can’t perform that action at this time.
0 commit comments