return the maximum element of the vector
| 151 | |
| 152 | // return the maximum element of the vector |
| 153 | double KeyListOpsMethods::getMax() { |
| 154 | if (empty()) return NAN; |
| 155 | |
| 156 | begin(); |
| 157 | double maxVal = getColValNum(); |
| 158 | for (; !end(); next()) { |
| 159 | double currVal = getColValNum(); |
| 160 | maxVal = (currVal > maxVal) ? currVal : maxVal; |
| 161 | } |
| 162 | return maxVal; |
| 163 | } |
| 164 | |
| 165 | // return the minimum absolute value of the vector |
| 166 | double KeyListOpsMethods::getAbsMin() { |