Changeset 37ec1b for util/src/average.cpp
- Timestamp:
- Apr 15, 2010, 3:05:18 PM (15 years ago)
- Children:
- ce0de8
- Parents:
- e34098
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util/src/average.cpp
re34098 r37ec1b 10 10 #include <iostream> 11 11 #include <iomanip> 12 #include <math.h> 12 13 #include <string> 13 14 #include <sstream> … … 59 60 } 60 61 // skip to next desired column 62 tmp = 0.; 61 63 for(;cols!=*ColRunner;++cols) 62 64 if (!line.eof()) // check for end of line … … 113 115 lines++; 114 116 // go through the columns 115 cols = 0;117 cols = -1; 116 118 for (IndexSet::const_iterator ColRunner = Columns.begin(); ColRunner != Columns.end(); ++ColRunner) { 117 119 // skip to next desired column 120 tmp = 0.; 118 121 for(;cols!=*ColRunner;++cols) 119 122 if (!line.eof()) // check for end of line … … 132 135 // go through each value in Results and take std deviation 133 136 for (MeanErrorMap::iterator Runner = Values->begin(); Runner != Values->end(); ++Runner) 134 if (CountMap[Runner->first] != 0) 135 Runner->second.second /= CountMap[Runner->first]; 136 else 137 if (CountMap[Runner->first] != 0) { 138 tmp = Runner->second.second; 139 Runner->second.second = sqrt(tmp)/CountMap[Runner->first]; 140 } else 137 141 cerr << "For column " << CountMap[Runner->first] << " no entries have been found." << endl; 138 142
Note:
See TracChangeset
for help on using the changeset viewer.