| 190 | } |
| 191 | |
| 192 | void updateOutInIndex(const HighsIndexCollection& index_collection, |
| 193 | HighsInt& out_from_ix, HighsInt& out_to_ix, |
| 194 | HighsInt& in_from_ix, HighsInt& in_to_ix, |
| 195 | HighsInt& current_set_entry) { |
| 196 | if (index_collection.is_interval_) { |
| 197 | out_from_ix = index_collection.from_; |
| 198 | out_to_ix = index_collection.to_; |
| 199 | in_from_ix = index_collection.to_ + 1; |
| 200 | in_to_ix = index_collection.dimension_ - 1; |
| 201 | } else if (index_collection.is_set_) { |
| 202 | out_from_ix = index_collection.set_[current_set_entry]; |
| 203 | out_to_ix = out_from_ix; |
| 204 | current_set_entry++; |
| 205 | HighsInt current_set_entry0 = current_set_entry; |
| 206 | for (HighsInt set_entry = current_set_entry0; |
| 207 | set_entry < index_collection.set_num_entries_; set_entry++) { |
| 208 | HighsInt ix = index_collection.set_[set_entry]; |
| 209 | if (ix > out_to_ix + 1) break; |
| 210 | out_to_ix = index_collection.set_[current_set_entry]; |
| 211 | current_set_entry++; |
| 212 | } |
| 213 | in_from_ix = out_to_ix + 1; |
| 214 | if (current_set_entry < index_collection.set_num_entries_) { |
| 215 | in_to_ix = index_collection.set_[current_set_entry] - 1; |
| 216 | } else { |
| 217 | // Account for getting to the end of the set |
| 218 | in_to_ix = index_collection.dimension_ - 1; |
| 219 | } |
| 220 | } else { |
| 221 | out_from_ix = in_to_ix + 1; |
| 222 | out_to_ix = index_collection.dimension_ - 1; |
| 223 | for (HighsInt ix = in_to_ix + 1; ix < index_collection.dimension_; ix++) { |
| 224 | if (!index_collection.mask_[ix]) { |
| 225 | out_to_ix = ix - 1; |
| 226 | break; |
| 227 | } |
| 228 | } |
| 229 | in_from_ix = out_to_ix + 1; |
| 230 | in_to_ix = index_collection.dimension_ - 1; |
| 231 | for (HighsInt ix = out_to_ix + 1; ix < index_collection.dimension_; ix++) { |
| 232 | if (index_collection.mask_[ix]) { |
| 233 | in_to_ix = ix - 1; |
| 234 | break; |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | HighsInt dataSize(const HighsIndexCollection& index_collection) { |
| 241 | if (index_collection.is_set_) { |
no outgoing calls