Changeset 736 for GTP/trunk/Lib/Vis/shared/EvalStats
- Timestamp:
- 04/08/06 23:35:12 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
r733 r736 110 110 } 111 111 112 112 113 void EvalNumViewCells(ofstream &outstream, 113 114 const StatsContainer &firstStats, 114 const StatsContainer ¤tStats ,115 vector<float> &ratios)115 const StatsContainer ¤tStats) 116 // vector<float> &ratios) 116 117 { 117 118 //const int n = min((int)firstStats.size(), (int)currentStats.size()); … … 126 127 // compare render cost of current view cell with render cost 127 128 // of other view cells. 128 for (it = currentStats.begin(); it != it_end; ++ it )129 for (it = currentStats.begin(); it != it_end; ++ it, ++ i) 129 130 { 130 131 int j = 0; … … 141 142 float ratio = (float)i / (float)j; 142 143 143 outstream << "#RenderCost " << renderCost << endl; 144 outstream << "#ViewCellsRatio " << ratio << endl; 145 144 outstream << "#Pass\n" << i << endl; 145 outstream << "#RenderCost\n" << renderCost << endl; 146 outstream << "#ViewCellsRatio\n" << ratio << endl << endl; 147 148 //cout << "#Pass " << i ++ << endl; 149 //cout << "#RenderCost " << renderCost << endl; 150 //cout << "#ViewCellsRatio " << ratio << endl; 146 151 } 147 152 } … … 159 164 160 165 vector<string> outFilenames; 166 vector<string> outFilenames2; 161 167 162 168 // read input files from command line … … 182 188 //sscanf(argv[i], "%s.log", fn); 183 189 string outFilename = string(fn) + string("-ratio.log"); 190 string outFilename2 = string(fn) + string("-reverse.log"); 184 191 185 192 outFilenames.push_back(outFilename); 193 outFilenames2.push_back(outFilename2); 194 cout << "new filen: " << outFilename2 << endl; 186 195 } 187 196 else … … 193 202 //statsOut << "rc1 size: " << (int)renderCosts1.size() << " " << (int)renderCosts2.size() << endl << endl; 194 203 vector<StatsContainer>::const_iterator it = renderStats.begin(), it_end = renderStats.end(); 204 195 205 vector<string>::const_iterator sit, sit_end = outFilenames.end(); 206 vector<string>::const_iterator sit2, sit2_end = outFilenames2.end(); 196 207 197 208 sit = outFilenames.begin(); 198 209 sit2 = outFilenames2.begin(); 210 199 211 // compare all values with this vector 200 212 StatsContainer &firstStats = renderStats[0]; … … 204 216 //++ sit; 205 217 206 for (it; it != it_end; ++ it )218 for (it; it != it_end; ++ it, ++ sit, ++ sit2) 207 219 { 208 220 cout << "now writing output to file " << *sit << endl; 209 221 ofstream statsOut; 210 222 statsOut.open((*sit).c_str()); 211 223 ofstream statsOut2; 224 statsOut2.open((*sit2).c_str()); 225 226 cout << "opening new file: " << (*sit2).c_str() << endl; 212 227 // compute size of output vector 213 228 const int n = min((int)firstStats.size(), (int)(*it).size()); … … 221 236 cout << "need " << vc << " view cells to reach rendercost of method " << i << " with " << n << " view cells" << endl; 222 237 #endif 238 EvalNumViewCells(statsOut2, firstStats, (*it)); 239 223 240 statsOut.close(); 224 225 ++ sit; 241 statsOut2.close(); 226 242 } 227 243
Note: See TracChangeset
for help on using the changeset viewer.