| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #pragma once
- #include <cstdio>
- #include <map>
- #include <vector>
- #include <functional>
- #define VARIATION_COEF 0.02
- class CMeanEstimate
- {
- public:
-
- static bool IsANumber(double x);
- static void RemoveNanValues(std::vector<double> *A);
- static void RemoveValues(std::vector<double> *A, double value);
- static void RemoveOutOfBoundsValues(std::vector<double> *A, double percent);//precent : Bounds are the means +/- percent of the mean
- static void FindMinMax(std::vector<double> *A, double &min, double &max);
- static void FindMinMaxWithinBoundsValues(std::vector<double> *A, double percent, double &min, double &max);
- static double GetVariance(std::vector<double> *A);
- static double GetStandardDeviation(std::vector<double> *A);
- static double GetMean(std::vector<double> *A);
- static double GetMeanEstimate(std::vector<double> *A, double similarityCoef);
- static double GetMeanEstimate(std::vector<double> *A);
- static double GetMeanEstimateFileOutput(std::vector<double> *A, double similarityCoef=VARIATION_COEF);
- static void PrintMeanEstimate(std::vector<double> *A, std::vector<double> *B);
- static void PrintMeanEstimate(std::vector<double> *A, std::vector<double> *B, double similarityCoef);
- protected:
- CMeanEstimate();
- virtual ~CMeanEstimate();
- };
|