|
@@ -43,6 +43,10 @@ export function convertValuesToHistogram(values: number[], bucketSize: number, m
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for (let i = 0; i < values.length; i++) {
|
|
for (let i = 0; i < values.length; i++) {
|
|
|
|
|
+ // filter out values outside the min and max boundaries
|
|
|
|
|
+ if (values[i] < min || values[i] > max) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
const bound = getBucketBound(values[i], bucketSize);
|
|
const bound = getBucketBound(values[i], bucketSize);
|
|
|
histogram[bound] = histogram[bound] + 1;
|
|
histogram[bound] = histogram[bound] + 1;
|
|
|
}
|
|
}
|