Initialize sum_sq before using it
or the standard deviation would be incorrect.
This commit is contained in:
parent
24ab750fba
commit
2eb363cea5
@ -23,7 +23,7 @@ public:
|
|||||||
double sum_sq;
|
double sum_sq;
|
||||||
|
|
||||||
LogHistogramSampler() = delete;
|
LogHistogramSampler() = delete;
|
||||||
LogHistogramSampler(int _bins) : sum(0.0) {
|
LogHistogramSampler(int _bins) : sum(0.0), sum_sq(0.0) {
|
||||||
assert(_bins > 0);
|
assert(_bins > 0);
|
||||||
|
|
||||||
bins.resize(_bins + 1, 0);
|
bins.resize(_bins + 1, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user