Changeset 725


Ignore:
Timestamp:
04/04/06 23:49:52 (18 years ago)
Author:
mattausch
Message:

commented out code for view cell evaluation...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp

    r720 r725  
    110110} 
    111111 
    112 // Computes number of view cells to reach the same render cost 
    113 int ComputeNoViewCells(const StatsContainer &firstStats,  
    114                                            const StatsContainer &currentStats) 
     112#if 0 
     113void EvalNumViewCells(const int i, 
     114                                          const StatsContainer &firstStats,  
     115                                          const StatsContainer &currentStats, 
     116                                          vector<float> &ratios) 
    115117{ 
    116118        const int n = min((int)firstStats.size(), (int)currentStats.size()); 
    117119 
    118         const float renderCost = (float)currentStats[n - 1].mRenderCost; 
     120        StatsContainer::const_iterator it, it_end = currentStats.end(); 
    119121 
    120122        int i = 0; 
    121         while ((i ++ < (int)firstStats.size()) && (renderCost > (int)firstStats[i].mRenderCost)); 
    122          
     123 
     124        for (it = currentStats.begin(); it != it_end; ++ it) 
     125        { 
     126                const float renderCost = (*it).mRenderCost; 
     127     
     128                // find equivalent render cost in second stats container 
     129                while ((i < n) && (renderCost < (int)firstStats[i ++].mRenderCost)); 
     130         
     131                // lower bound 
     132                int j = max (0, i - 1); 
     133        } 
     134 
    123135        return i; 
    124136} 
    125  
     137#endif 
    126138 
    127139int _tmain(int argc, _TCHAR* argv[]) 
     
    194206                        ComputeStats(statsOut, firstStats[i], (*it)[i], i); 
    195207                } 
    196                  
    197                 int vc = ComputeNoViewCells(firstStats, *it); 
     208#if 0 
     209                const int vc = ComputeNoViewCells(firstStats, *it); 
    198210                cout << "need " << vc << " view cells to reach rendercost of method " << i << " with " << n << " view cells" << endl; 
    199  
     211#endif 
    200212                statsOut.close(); 
    201213                 
Note: See TracChangeset for help on using the changeset viewer.