| 3305 | } |
| 3306 | |
| 3307 | HighsStatus Highs::getCols(const HighsInt from_col, const HighsInt to_col, |
| 3308 | HighsInt& num_col, double* costs, double* lower, |
| 3309 | double* upper, HighsInt& num_nz, HighsInt* start, |
| 3310 | HighsInt* index, double* value) const { |
| 3311 | if (from_col > to_col) { |
| 3312 | // Empty interval |
| 3313 | num_col = 0; |
| 3314 | num_nz = 0; |
| 3315 | return HighsStatus::kOk; |
| 3316 | } |
| 3317 | HighsIndexCollection index_collection; |
| 3318 | const HighsInt create_error = |
| 3319 | create(index_collection, from_col, to_col, model_.lp_.num_col_); |
| 3320 | if (create_error) { |
| 3321 | highsLogUser(options_.log_options, HighsLogType::kError, |
| 3322 | "Interval [%d, %d] supplied to Highs::getCols is out of range " |
| 3323 | "[0, %d)\n", |
| 3324 | int(from_col), int(to_col), int(model_.lp_.num_col_)); |
| 3325 | return HighsStatus::kError; |
| 3326 | } |
| 3327 | getColsInterface(index_collection, num_col, costs, lower, upper, num_nz, |
| 3328 | start, index, value); |
| 3329 | return HighsStatus::kOk; |
| 3330 | } |
| 3331 | |
| 3332 | HighsStatus Highs::getCols(const HighsInt num_set_entries, const HighsInt* set, |
| 3333 | HighsInt& num_col, double* costs, double* lower, |