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

Function highs_getBasisSolve

highspy/highs_bindings.cpp:286–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286std::tuple<HighsStatus, dense_array_t<double>> highs_getBasisSolve(
287 Highs* h, dense_array_t<double> rhs) {
288 HighsInt num_row = h->getNumRow();
289
290 py::buffer_info rhs_info = rhs.request();
291 double* rhs_ptr = static_cast<double*>(rhs_info.ptr);
292
293 HighsStatus status = HighsStatus::kOk;
294 std::vector<double> solution_vector(num_row);
295 double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
296
297 if (num_row > 0) status = h->getBasisSolve(rhs_ptr, solution_vector_ptr);
298 return std::make_tuple(status, py::cast(solution_vector));
299}
300
301std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
302 dense_array_t<HighsInt>>

Callers

nothing calls this directly

Calls 3

dataMethod · 0.80
getNumRowMethod · 0.45
getBasisSolveMethod · 0.45

Tested by

no test coverage detected