ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/Stats.hpp
(Generate patch)

Comparing trunk/src/brains/Stats.hpp (file contents):
Revision 541 by tim, Sun May 22 21:05:15 2005 UTC vs.
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC

# Line 51 | Line 51
51   #define BRAINS_STATS_HPP
52  
53   #include <string>
54 + #include <map>
55  
56   #include "math/SquareMatrix3.hpp"
57   namespace oopse {
# Line 84 | Line 85 | namespace oopse {
85        VHARM,
86        PRESSURE_TENSOR_X,
87        PRESSURE_TENSOR_Y,
88 <      PRESSURE_TENSOR_Z,      
88 >      PRESSURE_TENSOR_Z,  
89        ENDINDEX  //internal use
90      };
91  
92      Stats();
93 <    const double& operator [](int index) const {
93 >    const RealType& operator [](int index) const {
94        assert(index >=0 && index < ENDINDEX);
95        return data_[index];
96      }
97  
98 <    double& operator [](int index){
98 >    RealType& operator [](int index){
99        assert(index >=0 && index < ENDINDEX);            
100        return data_[index];
101      }
# Line 116 | Line 117 | namespace oopse {
117      void setTau(const Mat3x3d& tau) {
118        tau_ = tau;
119      }
120 <        
120 >
121 >    typedef std::map<std::string, Stats::StatsIndex> StatsMapType;
122 >    static  StatsMapType statsMap;
123 >  
124    private:
125      static void init();
126      static bool isInit_;
127 <    double data_[ENDINDEX - BEGININDEX];
127 >    RealType data_[ENDINDEX - BEGININDEX];
128      static std::string title_[ENDINDEX - BEGININDEX];
129      static std::string units_[ENDINDEX - BEGININDEX];
130      Mat3x3d tau_;
131    };
132  
133 +
134 +
135   } //end namespace oopse
136   #endif //BRAINS_STATS_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines