Changeset 3198 in Sophya for trunk/SophyaLib/HiStats/histerr.cc
- Timestamp:
- Apr 3, 2007, 5:15:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/histerr.cc
r3156 r3198 193 193 /********* Methode *********/ 194 194 /*! 195 Return the sum of bin value 196 */ 197 double HistoErr::Sum(void) 198 { 199 double s = 0.; 200 for(int_4 i=0;i<nx_;i++) { 201 if(ndata_(i)<1.) continue; 202 s += data_(i); 203 } 204 return s; 205 } 206 207 /********* Methode *********/ 208 /*! 209 Return the sum of the bin value squared 210 */ 211 double HistoErr::Sum2(void) 212 { 213 double s = 0.; 214 for(int_4 i=0;i<nx_;i++) { 215 if(ndata_(i)<1.) continue; 216 s += data_(i)*data_(i); 217 } 218 return s; 219 } 220 221 /********* Methode *********/ 222 /*! 223 Return the sum of the number of entries 224 */ 225 double HistoErr::SumN(void) 226 { 227 double s = 0.; 228 for(int_4 i=0;i<nx_;i++) { 229 if(ndata_(i)<1.) continue; 230 s += ndata_(i); 231 } 232 return s; 233 } 234 235 /********* Methode *********/ 236 /*! 195 237 Operateur egal HistoErr = HistoErr 196 238 */
Note:
See TracChangeset
for help on using the changeset viewer.