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

Function highs_getReducedColumnSparse

highspy/highs_bindings.cpp:405–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
406 dense_array_t<HighsInt>>
407highs_getReducedColumnSparse(Highs* h, HighsInt col) {
408 HighsInt num_row = h->getNumRow();
409
410 HighsStatus status = HighsStatus::kOk;
411 HighsInt solution_num_nz = 0;
412 std::vector<double> solution_vector(num_row);
413 std::vector<HighsInt> solution_index(num_row);
414 double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
415 HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
416
417 if (num_row > 0)
418 status = h->getReducedColumn(col, solution_vector_ptr, &solution_num_nz,
419 solution_index_ptr);
420 return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
421 py::cast(solution_index));
422}
423
424std::tuple<HighsStatus, HighsLp> highs_getFixedLp(Highs* h) {
425 HighsLp lp;

Callers

nothing calls this directly

Calls 3

dataMethod · 0.80
getNumRowMethod · 0.45
getReducedColumnMethod · 0.45

Tested by

no test coverage detected