diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:30 +0000 |
commit | aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7 (patch) | |
tree | 941cbdd387b41c1a81587c20a6df9f0e5e0ff7ab /ml/SamplesBuffer.h | |
parent | Adding upstream version 1.37.1. (diff) | |
download | netdata-aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7.tar.xz netdata-aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7.zip |
Adding upstream version 1.38.0.upstream/1.38.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/SamplesBuffer.h')
-rw-r--r-- | ml/SamplesBuffer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ml/SamplesBuffer.h b/ml/SamplesBuffer.h index 1c7215cca..ca60f4b91 100644 --- a/ml/SamplesBuffer.h +++ b/ml/SamplesBuffer.h @@ -86,9 +86,12 @@ public: DiffN(DiffN), SmoothN(SmoothN), LagN(LagN), SamplingRatio(SamplingRatio), RandNums(RandNums), BytesPerSample(NumDimsPerSample * sizeof(CalculatedNumber)), - Preprocessed(false) {}; + Preprocessed(false) { + assert(NumDimsPerSample == 1 && "SamplesBuffer supports only one dimension per sample"); + }; - std::vector<DSample> preprocess(); + void preprocess(std::vector<DSample> &Samples); + void preprocess(DSample &Feature); std::vector<Sample> getPreprocessedSamples() const; size_t capacity() const { return NumSamples; } |