summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/statistical/statistical.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:18 +0000
commit5da14042f70711ea5cf66e034699730335462f66 (patch)
tree0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/libnetdata/statistical/statistical.h
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz
netdata-5da14042f70711ea5cf66e034699730335462f66.zip
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libnetdata/statistical/statistical.h')
-rw-r--r--src/libnetdata/statistical/statistical.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/libnetdata/statistical/statistical.h b/src/libnetdata/statistical/statistical.h
new file mode 100644
index 000000000..f3ecfadb4
--- /dev/null
+++ b/src/libnetdata/statistical/statistical.h
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_STATISTICAL_H
+#define NETDATA_STATISTICAL_H 1
+
+#include "../libnetdata.h"
+
+void log_series_to_stderr(NETDATA_DOUBLE *series, size_t entries, NETDATA_DOUBLE result, const char *msg);
+
+NETDATA_DOUBLE average(const NETDATA_DOUBLE *series, size_t entries);
+NETDATA_DOUBLE moving_average(const NETDATA_DOUBLE *series, size_t entries, size_t period);
+NETDATA_DOUBLE median(const NETDATA_DOUBLE *series, size_t entries);
+NETDATA_DOUBLE moving_median(const NETDATA_DOUBLE *series, size_t entries, size_t period);
+NETDATA_DOUBLE running_median_estimate(const NETDATA_DOUBLE *series, size_t entries);
+NETDATA_DOUBLE standard_deviation(const NETDATA_DOUBLE *series, size_t entries);
+NETDATA_DOUBLE single_exponential_smoothing(const NETDATA_DOUBLE *series, size_t entries, NETDATA_DOUBLE alpha);
+extern NETDATA_DOUBLE
+single_exponential_smoothing_reverse(const NETDATA_DOUBLE *series, size_t entries, NETDATA_DOUBLE alpha);
+NETDATA_DOUBLE double_exponential_smoothing(const NETDATA_DOUBLE *series, size_t entries,
+ NETDATA_DOUBLE alpha,
+ NETDATA_DOUBLE beta,
+ NETDATA_DOUBLE *forecast);
+NETDATA_DOUBLE holtwinters(const NETDATA_DOUBLE *series, size_t entries,
+ NETDATA_DOUBLE alpha,
+ NETDATA_DOUBLE beta,
+ NETDATA_DOUBLE gamma,
+ NETDATA_DOUBLE *forecast);
+NETDATA_DOUBLE sum_and_count(const NETDATA_DOUBLE *series, size_t entries, size_t *count);
+NETDATA_DOUBLE sum(const NETDATA_DOUBLE *series, size_t entries);
+NETDATA_DOUBLE median_on_sorted_series(const NETDATA_DOUBLE *series, size_t entries);
+NETDATA_DOUBLE *copy_series(const NETDATA_DOUBLE *series, size_t entries);
+void sort_series(NETDATA_DOUBLE *series, size_t entries);
+
+#endif //NETDATA_STATISTICAL_H