summaryrefslogtreecommitdiffstats
path: root/ml/SamplesBuffer.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 16:11:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 16:11:34 +0000
commitd079b656b4719739b2247dcd9d46e9bec793095a (patch)
treed2c950c70a776bcf697c963151c5bd959f8a9f03 /ml/SamplesBuffer.h
parentReleasing debian version 1.37.1-2. (diff)
downloadnetdata-d079b656b4719739b2247dcd9d46e9bec793095a.tar.xz
netdata-d079b656b4719739b2247dcd9d46e9bec793095a.zip
Merging upstream version 1.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/SamplesBuffer.h')
-rw-r--r--ml/SamplesBuffer.h7
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; }