Changeset 827 for GTP/trunk/Lib/Vis/shared/EvalStats
- Timestamp:
- 04/26/06 14:59:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
r744 r827 191 191 192 192 193 194 195 196 // evaluate number of view cells needed for same rendercost 197 int EvalSingleNumViewCells(const StatsContainer ¤tStats, 198 const float cost) 199 { 200 201 StatsContainer::const_iterator it, it_end = currentStats.end(); 202 203 RenderStats dummy; dummy.mRenderCost = cost; 204 205 // find equivalent render cost in the other stats container. 206 // don't stop until cursor is placed one element behind 207 // or end of vector is reached 208 StatsContainer::const_iterator equalCostIt = std::upper_bound(currentStats.begin(),currentStats.end(), dummy, vlt); 209 210 int j = (int)(equalCostIt - currentStats.begin()); 211 212 return j; 213 } 214 215 216 193 217 int _tmain(int argc, _TCHAR* argv[]) 194 218 { … … 203 227 vector<string> outFilenames; 204 228 vector<string> outFilenames2; 205 229 vector<string> methodnames; 206 230 // read input files from command line 207 231 for (int i = 1; i < argc; ++ i) … … 227 251 string outFilename = string(fn) + string("-ratio.log"); 228 252 string outFilename2 = string(fn) + string("-reverse.log"); 229 253 230 254 outFilenames.push_back(outFilename); 231 255 outFilenames2.push_back(outFilename2); 256 methodnames.push_back(fn); 257 232 258 cout << "new filen: " << outFilename2 << endl; 233 259 } … … 243 269 vector<string>::const_iterator sit, sit_end = outFilenames.end(); 244 270 vector<string>::const_iterator sit2, sit2_end = outFilenames2.end(); 271 vector<string>::const_iterator sit3, sit3_end = methodnames.end(); 272 245 273 246 274 sit = outFilenames.begin(); 247 275 sit2 = outFilenames2.begin(); 276 sit3 = methodnames.begin(); 248 277 249 278 // compare all values with this vector … … 253 282 //++ it; 254 283 //++ sit; 255 256 for (it; it != it_end; ++ it, ++ sit, ++ sit2) 284 ofstream statsOut3; 285 statsOut3.open("numviewcells.log"); 286 287 for (it; it != it_end; ++ it, ++ sit, ++ sit2, ++sit3) 257 288 { 258 289 cout << "now writing output to file " << *sit << endl; 290 259 291 ofstream statsOut; 260 292 statsOut.open((*sit).c_str()); 293 261 294 ofstream statsOut2; 262 295 statsOut2.open((*sit2).c_str()); … … 275 308 EvalNumViewCells(statsOut2, firstStats, (*it)); 276 309 310 const float rendercost = 100; 311 const int j = EvalSingleNumViewCells(*it, rendercost); 312 313 statsOut3 << (*sit3).c_str() << " " << j << endl; 314 277 315 statsOut.close(); 278 316 statsOut2.close(); 279 317 } 280 318 319 statsOut3.close(); 320 321 322 281 323 return 0; 282 324 }
Note: See TracChangeset
for help on using the changeset viewer.