| 259 | } |
| 260 | |
| 261 | bool increasingSetOk(const vector<HighsInt>& set, |
| 262 | const HighsInt set_entry_lower, |
| 263 | const HighsInt set_entry_upper, bool strict) { |
| 264 | HighsInt set_num_entries = set.size(); |
| 265 | bool check_bounds = set_entry_lower <= set_entry_upper; |
| 266 | HighsInt previous_entry; |
| 267 | if (check_bounds) { |
| 268 | if (strict) { |
| 269 | previous_entry = set_entry_lower - 1; |
| 270 | } else { |
| 271 | previous_entry = set_entry_lower; |
| 272 | } |
| 273 | } else { |
| 274 | previous_entry = -kHighsIInf; |
| 275 | } |
| 276 | for (HighsInt k = 0; k < set_num_entries; k++) { |
| 277 | HighsInt entry = set[k]; |
| 278 | if (strict) { |
| 279 | if (entry <= previous_entry) return false; |
| 280 | } else { |
| 281 | if (entry < previous_entry) return false; |
| 282 | } |
| 283 | if (check_bounds && entry > set_entry_upper) return false; |
| 284 | previous_entry = entry; |
| 285 | } |
| 286 | return true; |
| 287 | } |
| 288 | |
| 289 | bool increasingSetOk(const vector<double>& set, const double set_entry_lower, |
| 290 | const double set_entry_upper, bool strict) { |
no test coverage detected