Changeset 827 for GTP/trunk/Lib/Vis/shared
- Timestamp:
- 04/26/06 14:59:00 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/shared
- Files:
-
- 3 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 } -
GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln
r668 r827 21 21 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EvalStats", "..\EvalStats\EvalStats.vcproj", "{935D1BDD-41B0-49F1-A86C-EB49B94DDB20}" 22 22 ProjectSection(ProjectDependencies) = postProject 23 EndProjectSection 24 EndProject 25 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPreprocessor", "..\..\Preprocessing\scripts\TestPreprocessor.vcproj", "{0D592644-5404-4054-8F11-CF0B178D286D}" 26 ProjectSection(ProjectDependencies) = postProject 27 {EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA} 23 28 EndProjectSection 24 29 EndProject … … 49 54 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release.ActiveCfg = Release|Win32 50 55 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release.Build.0 = Release|Win32 56 {0D592644-5404-4054-8F11-CF0B178D286D}.Debug.ActiveCfg = Debug|Win32 57 {0D592644-5404-4054-8F11-CF0B178D286D}.Debug.Build.0 = Debug|Win32 58 {0D592644-5404-4054-8F11-CF0B178D286D}.Release.ActiveCfg = Release|Win32 59 {0D592644-5404-4054-8F11-CF0B178D286D}.Release.Build.0 = Release|Win32 51 60 EndGlobalSection 52 61 GlobalSection(ExtensibilityGlobals) = postSolution
Note: See TracChangeset
for help on using the changeset viewer.