| 139 | |
| 140 | |
| 141 | void clear() { |
| 142 | _cnt = 0; |
| 143 | _sum = 0; |
| 144 | _min = 0; |
| 145 | _max = 0; |
| 146 | _extra.clear(); |
| 147 | // NOTE: _extra "guards" the conditional code e.g. ssqdiff |
| 148 | // NOTE: ssqdiff = not _ssq but sum of square differences |
| 149 | // which is SUM(from i = 1 to N) of f(i)-_ave_N)**2 |
| 150 | } |
| 151 | |
| 152 | |
| 153 | // returns value actually added |