Rename local variable to avoid hiding class field

This commit is contained in:
aherbert 2022-10-13 17:31:41 +01:00
parent 1df6c402c1
commit f916fba364
1 changed files with 4 additions and 4 deletions

View File

@ -185,19 +185,19 @@ public final class EmpiricalDistribution extends AbstractRealDistribution
* @return bins statistics.
*/
private List<SummaryStatistics> createBinStats(double[] input) {
final List<SummaryStatistics> binStats = new ArrayList<>();
final List<SummaryStatistics> stats = new ArrayList<>();
for (int i = 0; i < binCount; i++) {
binStats.add(i, new SummaryStatistics());
stats.add(i, new SummaryStatistics());
}
// Second pass though the data.
for (int i = 0; i < input.length; i++) {
final double v = input[i];
binStats.get(findBin(v)).addValue(v);
stats.get(findBin(v)).addValue(v);
}
return binStats;
return stats;
}
/**