MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / getBasisTransposeSolve

Method getBasisTransposeSolve

highs/lp_data/Highs.cpp:2370–2395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2368}
2369
2370HighsStatus 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
2397HighsStatus Highs::getReducedRow(const HighsInt row, double* row_vector,
2398 HighsInt* row_num_nz, HighsInt* row_indices,

Callers 5

computeMethod · 0.45
testBasisSolveFunction · 0.45

Calls 1

highsLogUserFunction · 0.85

Tested by 1

testBasisSolveFunction · 0.36