Ignore:
Timestamp:
08/28/06 03:42:51 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r1287 r1288  
    5959 
    6060 
     61 
     62/** View space partition statistics. 
     63*/ 
     64class HierarchyStatistics: public StatisticsBase 
     65{ 
     66public: 
     67 
     68        /// total number of nodes 
     69        int nodes; 
     70                 
     71        /// maximal reached depth 
     72        int maxDepth; 
     73         
     74        /// accumulated depth 
     75        int accumDepth; 
     76 
     77        // Constructor 
     78        HierarchyStatistics()  
     79        { 
     80                Reset(); 
     81        } 
     82 
     83        int Nodes() const {return nodes;} 
     84        int Interior() const { return nodes / 2; } 
     85        int Leaves() const { return (nodes / 2) + 1; } 
     86         
     87        // TODO: computation wrong 
     88        double AvgDepth() const { return accumDepth / (double)Leaves();} 
     89         
     90 
     91        void Reset()  
     92        { 
     93                nodes = 0; 
     94                maxDepth = 0; 
     95                accumDepth = 0; 
     96        } 
     97 
     98 
     99        void Print(ostream &app) const; 
     100 
     101        friend ostream &operator<<(ostream &s, const HierarchyStatistics &stat)  
     102        { 
     103                stat.Print(s); 
     104                return s; 
     105        }  
     106}; 
     107 
     108 
    61109typedef FlexibleHeap<SubdivisionCandidate *> SplitQueue; 
    62110 
     
    213261                const ObjectContainer &objects); 
    214262 
     263        void ParseEnvironment(); 
     264 
     265 
    215266protected: 
    216267 
     
    235286        float mTotalCost; 
    236287 
     288        HierarchyStatistics mHierarchyStats; 
     289 
     290        int mMaxLeaves; 
    237291        ofstream mSubdivisionStats; 
    238292}; 
Note: See TracChangeset for help on using the changeset viewer.