| 2368 | } |
| 2369 | |
| 2370 | HighsStatus Highs::getBasisTransposeSolve(const double* Xrhs, |
| 2371 | double* solution_vector, |
| 2372 | HighsInt* solution_num_nz, |
| 2373 | HighsInt* solution_indices) { |
| 2374 | if (Xrhs == NULL) { |
| 2375 | highsLogUser(options_.log_options, HighsLogType::kError, |
| 2376 | "getBasisTransposeSolve: Xrhs is NULL\n"); |
| 2377 | return HighsStatus::kError; |
| 2378 | } |
| 2379 | if (solution_vector == NULL) { |
| 2380 | highsLogUser(options_.log_options, HighsLogType::kError, |
| 2381 | "getBasisTransposeSolve: solution_vector is NULL\n"); |
| 2382 | return HighsStatus::kError; |
| 2383 | } |
| 2384 | // solution_indices can be NULL - it's the trigger that determines |
| 2385 | // whether they are identified or not |
| 2386 | if (!ekk_instance_.status_.has_invert) |
| 2387 | return invertRequirementError("getBasisTransposeSolve"); |
| 2388 | HighsInt num_row = model_.lp_.num_row_; |
| 2389 | vector<double> rhs; |
| 2390 | rhs.assign(num_row, 0); |
| 2391 | for (HighsInt row = 0; row < num_row; row++) rhs[row] = Xrhs[row]; |
| 2392 | basisSolveInterface(rhs, solution_vector, solution_num_nz, solution_indices, |
| 2393 | true); |
| 2394 | return HighsStatus::kOk; |
| 2395 | } |
| 2396 | |
| 2397 | HighsStatus Highs::getReducedRow(const HighsInt row, double* row_vector, |
| 2398 | HighsInt* row_num_nz, HighsInt* row_indices, |