From a9d50977812d28f6269f406544a501f7b41c7943 Mon Sep 17 00:00:00 2001 From: Lucas Stauder <git@lucas-stauder.de> Date: Wed, 22 Jan 2025 17:06:10 +0000 Subject: [PATCH] feat: WiSe 2024/25 --- src/histogram.hpp | 8 ++++++++ src/outliers.hpp | 12 ++++++++++++ src/statistics.hpp | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 src/histogram.hpp create mode 100644 src/outliers.hpp create mode 100644 src/statistics.hpp diff --git a/src/histogram.hpp b/src/histogram.hpp new file mode 100644 index 0000000..8dfce4b --- /dev/null +++ b/src/histogram.hpp @@ -0,0 +1,8 @@ +#ifndef PROGAUT_UEBUNG6_HISTOGRAM_HPP +#define PROGAUT_UEBUNG6_HISTOGRAM_HPP + +#include <vector> + +int getMostFrequentValue(const std::vector<int>& data); + +#endif // PROGAUT_UEBUNG6_HISTOGRAM_HPP diff --git a/src/outliers.hpp b/src/outliers.hpp new file mode 100644 index 0000000..604ea01 --- /dev/null +++ b/src/outliers.hpp @@ -0,0 +1,12 @@ +#ifndef PROGAUT_UEBUNG6_OUTLIERS_HPP +#define PROGAUT_UEBUNG6_OUTLIERS_HPP + +#include <vector> +#include <cstddef> +#include <cmath> + +double findNMin(const std::vector<double>& data, size_t n); +double findNMax(const std::vector<double>& data, size_t n); +std::vector<double> removeOutliers(std::vector<double> data, size_t n); + +#endif // PROGAUT_UEBUNG6_OUTLIERS_HPP diff --git a/src/statistics.hpp b/src/statistics.hpp new file mode 100644 index 0000000..73bc182 --- /dev/null +++ b/src/statistics.hpp @@ -0,0 +1,8 @@ +#ifndef PROGAUT_UEBUNG6_STATISTICS_HPP +#define PROGAUT_UEBUNG6_STATISTICS_HPP + +#include <vector> +#include <cstddef> +size_t countValuesNearMean(const std::vector<double>& data); + +#endif // PROGAUT_UEBUNG6_STATISTICS_HPP -- GitLab