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