Ignore:
Timestamp:
04/08/06 23:35:12 (18 years ago)
Author:
mattausch
Message:

completed histogram

File:
1 edited

Legend:

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

    r733 r736  
    110110} 
    111111 
     112 
    112113void EvalNumViewCells(ofstream &outstream, 
    113114                                          const StatsContainer &firstStats,  
    114                                           const StatsContainer &currentStats, 
    115                                           vector<float> &ratios) 
     115                                          const StatsContainer &currentStats) 
     116                //                        vector<float> &ratios) 
    116117{ 
    117118        //const int n = min((int)firstStats.size(), (int)currentStats.size()); 
     
    126127        // compare render cost of current view cell with render cost  
    127128        // of other view cells. 
    128         for (it = currentStats.begin(); it != it_end; ++ it) 
     129        for (it = currentStats.begin(); it != it_end; ++ it, ++ i) 
    129130        { 
    130131                int j = 0; 
     
    141142                float ratio = (float)i / (float)j; 
    142143 
    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;   
    146151        } 
    147152} 
     
    159164 
    160165        vector<string> outFilenames; 
     166        vector<string> outFilenames2; 
    161167 
    162168        // read input files from command line 
     
    182188                        //sscanf(argv[i], "%s.log", fn); 
    183189                        string outFilename = string(fn) + string("-ratio.log"); 
     190                        string outFilename2 = string(fn) + string("-reverse.log"); 
    184191 
    185192                        outFilenames.push_back(outFilename); 
     193                        outFilenames2.push_back(outFilename2); 
     194                        cout << "new filen: " << outFilename2 << endl; 
    186195                } 
    187196                else 
     
    193202        //statsOut << "rc1 size: " << (int)renderCosts1.size() << " " << (int)renderCosts2.size() << endl << endl; 
    194203        vector<StatsContainer>::const_iterator it = renderStats.begin(), it_end = renderStats.end(); 
     204 
    195205        vector<string>::const_iterator sit, sit_end = outFilenames.end(); 
     206        vector<string>::const_iterator sit2, sit2_end = outFilenames2.end(); 
    196207 
    197208        sit = outFilenames.begin(); 
    198          
     209        sit2 = outFilenames2.begin(); 
     210 
    199211        // compare all values with this vector 
    200212        StatsContainer &firstStats = renderStats[0]; 
     
    204216        //++ sit; 
    205217 
    206         for (it; it != it_end; ++ it) 
     218        for (it; it != it_end; ++ it, ++ sit, ++ sit2) 
    207219        { 
    208220                cout << "now writing output to file " << *sit << endl; 
    209221                ofstream statsOut; 
    210222                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; 
    212227                // compute size of output vector 
    213228                const int n = min((int)firstStats.size(), (int)(*it).size()); 
     
    221236                cout << "need " << vc << " view cells to reach rendercost of method " << i << " with " << n << " view cells" << endl; 
    222237#endif 
     238                EvalNumViewCells(statsOut2, firstStats, (*it)); 
     239 
    223240                statsOut.close(); 
    224                  
    225                 ++ sit; 
     241                statsOut2.close(); 
    226242        } 
    227243 
Note: See TracChangeset for help on using the changeset viewer.