return the minimum element of the vector
| 138 | } |
| 139 | // return the minimum element of the vector |
| 140 | double KeyListOpsMethods::getMin() { |
| 141 | if (empty()) return NAN; |
| 142 | |
| 143 | begin(); |
| 144 | double minVal = getColValNum(); |
| 145 | for (; !end(); next()) { |
| 146 | double currVal = getColValNum(); |
| 147 | minVal = (currVal < minVal) ? currVal : minVal; |
| 148 | } |
| 149 | return minVal; |
| 150 | } |
| 151 | |
| 152 | // return the maximum element of the vector |
| 153 | double KeyListOpsMethods::getMax() { |