Changeset 3520 in Sophya for trunk/SophyaPI/PIext/pihisto2d.cc
- Timestamp:
- Sep 11, 2008, 2:45:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto2d.cc
r3153 r3520 23 23 P2DHistoWrapper::~P2DHistoWrapper() 24 24 { 25 } 26 27 28 double P2DHistoWrapper::MeanVal(int ix1, int ix2, int jy1, int jy2) 29 { 30 int ec; 31 if (ix1>ix2) { ec=ix1; ix1=ix2; ix2=ec; } 32 if (jy1>jy2) { ec=jy1; jy1=jy2; jy2=ec; } 33 double ss = 0.; 34 for(int j=jy1; j<=jy2; j++) 35 for(int i=ix1; i<=ix2; i++) ss += (double)((*this)(i, j)); 36 ss /= (double)((jy2-jy1+1)*(ix2-ix1+1)); 37 return ss; 25 38 } 26 39
Note:
See TracChangeset
for help on using the changeset viewer.