return the total of the values in the vector
| 38 | |
| 39 | // return the total of the values in the vector |
| 40 | double KeyListOpsMethods::getSum() { |
| 41 | if (empty()) return NAN; |
| 42 | |
| 43 | double theSum = 0.0; |
| 44 | for (begin(); !end(); next()) { |
| 45 | theSum += getColValNum(); |
| 46 | } |
| 47 | return theSum; |
| 48 | } |
| 49 | |
| 50 | // return the average value in the vector |
| 51 | double KeyListOpsMethods::getMean() { |