Changeset 733 for GTP/trunk/Lib/Vis/shared/EvalStats
- Timestamp:
- 04/07/06 08:19:29 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
r725 r733 110 110 } 111 111 112 #if 0 113 void EvalNumViewCells(const int i, 112 void EvalNumViewCells(ofstream &outstream, 114 113 const StatsContainer &firstStats, 115 114 const StatsContainer ¤tStats, 116 115 vector<float> &ratios) 117 116 { 118 const int n = min((int)firstStats.size(), (int)currentStats.size()); 119 117 //const int n = min((int)firstStats.size(), (int)currentStats.size()); 118 const int n = (int)firstStats.size(); 119 120 120 StatsContainer::const_iterator it, it_end = currentStats.end(); 121 121 122 122 int i = 0; 123 123 124 // currentStats would be the other (necessarily worse?) method 125 // firstStats would be our method 126 // compare render cost of current view cell with render cost 127 // of other view cells. 124 128 for (it = currentStats.begin(); it != it_end; ++ it) 125 129 { 130 int j = 0; 131 126 132 const float renderCost = (*it).mRenderCost; 127 133 128 // find equivalent render cost in second stats container 129 while ((i < n) && (renderCost < (int)firstStats[i ++].mRenderCost)); 134 // find equivalent render cost in the other stats container. 135 // don't stop until cursor is placed one element behind 136 // or end of vector is reached 137 while ((j < n) && (renderCost > (int)firstStats[j ++].mRenderCost)); 130 138 131 139 // lower bound 132 int j = max (0, i - 1); 133 } 134 135 return i; 136 } 137 #endif 140 //int j = max (0, i - 1); 141 float ratio = (float)i / (float)j; 142 143 outstream << "#RenderCost " << renderCost << endl; 144 outstream << "#ViewCellsRatio " << ratio << endl; 145 146 } 147 } 148 138 149 139 150 int _tmain(int argc, _TCHAR* argv[])
Note: See TracChangeset
for help on using the changeset viewer.