| 2342 | } |
| 2343 | |
| 2344 | HighsStatus Highs::getBasisSolve(const double* Xrhs, double* solution_vector, |
| 2345 | HighsInt* solution_num_nz, |
| 2346 | HighsInt* solution_indices) { |
| 2347 | if (Xrhs == NULL) { |
| 2348 | highsLogUser(options_.log_options, HighsLogType::kError, |
| 2349 | "getBasisSolve: Xrhs is NULL\n"); |
| 2350 | return HighsStatus::kError; |
| 2351 | } |
| 2352 | if (solution_vector == NULL) { |
| 2353 | highsLogUser(options_.log_options, HighsLogType::kError, |
| 2354 | "getBasisSolve: solution_vector is NULL\n"); |
| 2355 | return HighsStatus::kError; |
| 2356 | } |
| 2357 | // solution_indices can be NULL - it's the trigger that determines |
| 2358 | // whether they are identified or not |
| 2359 | if (!ekk_instance_.status_.has_invert) |
| 2360 | return invertRequirementError("getBasisSolve"); |
| 2361 | HighsInt num_row = model_.lp_.num_row_; |
| 2362 | vector<double> rhs; |
| 2363 | rhs.assign(num_row, 0); |
| 2364 | for (HighsInt row = 0; row < num_row; row++) rhs[row] = Xrhs[row]; |
| 2365 | basisSolveInterface(rhs, solution_vector, solution_num_nz, solution_indices, |
| 2366 | false); |
| 2367 | return HighsStatus::kOk; |
| 2368 | } |
| 2369 | |
| 2370 | HighsStatus Highs::getBasisTransposeSolve(const double* Xrhs, |
| 2371 | double* solution_vector, |