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

Function highs_getReducedRowSparse

highspy/highs_bindings.cpp:374–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374std::tuple<HighsStatus, dense_array_t<double>, HighsInt,
375 dense_array_t<HighsInt>>
376highs_getReducedRowSparse(Highs* h, HighsInt row) {
377 HighsInt num_row = h->getNumRow();
378
379 HighsStatus status = HighsStatus::kOk;
380 HighsInt solution_num_nz = 0;
381 std::vector<double> solution_vector(num_row);
382 std::vector<HighsInt> solution_index(num_row);
383 double* solution_vector_ptr = static_cast<double*>(solution_vector.data());
384 HighsInt* solution_index_ptr = static_cast<HighsInt*>(solution_index.data());
385
386 if (num_row > 0)
387 status = h->getReducedRow(row, solution_vector_ptr, &solution_num_nz,
388 solution_index_ptr);
389 return std::make_tuple(status, py::cast(solution_vector), solution_num_nz,
390 py::cast(solution_index));
391}
392
393std::tuple<HighsStatus, dense_array_t<double>> highs_getReducedColumn(
394 Highs* h, HighsInt col) {

Callers

nothing calls this directly

Calls 3

dataMethod · 0.80
getNumRowMethod · 0.45
getReducedRowMethod · 0.45

Tested by

no test coverage detected