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

Function highs_getBasisTransposeSolveSparse

highspy/highs_bindings.cpp:339–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
340 dense_array_t<HighsInt>>
341highs_getBasisTransposeSolveSparse(Highs* h, dense_array_t<double> rhs) {
342 HighsInt num_row = h->getNumRow();
343
344 py::buffer_info rhs_info = rhs.request();
345 double* rhs_ptr = static_cast<double*>(rhs_info.ptr);
346
347 HighsStatus status = HighsStatus::kOk;
348 HighsInt solution_num_nz = 0;
349 std::vector<double> solution_vector(num_row);
350 std::vector<HighsInt> solution_index(num_row);
351 double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
352 HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
353
354 if (num_row > 0)
355 status = h->getBasisTransposeSolve(rhs_ptr, solution_vector_ptr,
356 &solution_num_nz, solution_index_ptr);
357 return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
358 py::cast(solution_index));
359}
360
361std::tuple<HighsStatus, dense_array_t<double>> highs_getReducedRow(
362 Highs* h, HighsInt row) {

Callers

nothing calls this directly

Calls 3

dataMethod · 0.80
getNumRowMethod · 0.45

Tested by

no test coverage detected