diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:42 +0000 |
commit | 112b5b91647c3dea45cc1c9bc364df526c8012f1 (patch) | |
tree | 450af925135ec664c4310a1eb28b69481094ee2a /ml/kmeans | |
parent | Releasing debian version 1.32.1-2. (diff) | |
download | netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.tar.xz netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.zip |
Merging upstream version 1.33.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/kmeans')
-rw-r--r-- | ml/kmeans/SamplesBuffer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ml/kmeans/SamplesBuffer.h b/ml/kmeans/SamplesBuffer.h index fccd216d5..5c3cb1a97 100644 --- a/ml/kmeans/SamplesBuffer.h +++ b/ml/kmeans/SamplesBuffer.h @@ -20,8 +20,9 @@ public: Sample(CalculatedNumber *Buf, size_t N) : CNs(Buf), NumDims(N) {} void initDSample(DSample &DS) const { - for (size_t Idx = 0; Idx != NumDims; Idx++) - DS(Idx) = CNs[Idx]; + for (size_t Idx = 0; Idx != NumDims; Idx++) { + DS(Idx) = std::abs(CNs[Idx]); + } } void add(const Sample &RHS) const { |