From eee57e84aef9dfa0e7f2bf9a26a96b0736e309ee Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Fri, 6 Jul 2012 17:40:33 -0400 Subject: renamed standard-deviation folder to std-deviation to avoid conflict with binary name --- fly-tools/standard-deviation/StandardDeviation.cpp | 91 --------------------- fly-tools/std-deviation/StandardDeviation.cpp | 91 +++++++++++++++++++++ fly-tools/std-deviation/a.out | Bin 0 -> 29170 bytes 3 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 fly-tools/standard-deviation/StandardDeviation.cpp create mode 100644 fly-tools/std-deviation/StandardDeviation.cpp create mode 100755 fly-tools/std-deviation/a.out (limited to 'fly-tools') diff --git a/fly-tools/standard-deviation/StandardDeviation.cpp b/fly-tools/standard-deviation/StandardDeviation.cpp deleted file mode 100644 index 04c301d..0000000 --- a/fly-tools/standard-deviation/StandardDeviation.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include -#include -#include -#include -#include -using namespace std; - -vector currentHistogramValues; - -int main(int argc, char* argv[]) { - - // argv[1] input file containing the list of files - // argv[2] output file containing the standard deviation and file name pair - // argv[3] data file path - // argv[4] data file postfix of metricname - - if (argc < 3) { - cout<<"Please provide the parameters ./executable iputfilename outputfilename"<>currentFileName) { - - string currentFileWithExtension = prefixPath + currentFileName + "/" + currentFileName + "_"+ metricName +".txt"; - cout<<"File"<> currentValueOfHistogram) { - sumOfValues = sumOfValues + i*currentValueOfHistogram; - currentHistogramValues.push_back(currentValueOfHistogram); - - N = N + currentValueOfHistogram; - i=i+1.0; - } - - M = currentHistogramValues.size(); - // mean - double mean = sumOfValues/N; - - - // sigma^2 = (sum( (i-mean)^2*H_i ) )/(N-1) for i = 0 to M-1 - double standardDev = 0.0; - double sumSquaredResults = 0.0; - int j = 0; - for (i=0.0; i +#include +#include +#include +#include +#include +using namespace std; + +vector currentHistogramValues; + +int main(int argc, char* argv[]) { + + // argv[1] input file containing the list of files + // argv[2] output file containing the standard deviation and file name pair + // argv[3] data file path + // argv[4] data file postfix of metricname + + if (argc < 3) { + cout<<"Please provide the parameters ./executable iputfilename outputfilename"<>currentFileName) { + + string currentFileWithExtension = prefixPath + currentFileName + "/" + currentFileName + "_"+ metricName +".txt"; + cout<<"File"<> currentValueOfHistogram) { + sumOfValues = sumOfValues + i*currentValueOfHistogram; + currentHistogramValues.push_back(currentValueOfHistogram); + + N = N + currentValueOfHistogram; + i=i+1.0; + } + + M = currentHistogramValues.size(); + // mean + double mean = sumOfValues/N; + + + // sigma^2 = (sum( (i-mean)^2*H_i ) )/(N-1) for i = 0 to M-1 + double standardDev = 0.0; + double sumSquaredResults = 0.0; + int j = 0; + for (i=0.0; i