Skip to content

Commit

Permalink
Merge pull request #2030 from ERGO-Code/fix-2028
Browse files Browse the repository at this point in the history
Add getColIntegrality to highspy
  • Loading branch information
jajhall authored Nov 5, 2024
2 parents 1fb0fe4 + fb7b1c7 commit 3e7cd1a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/highs_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,14 @@ highs_getColsEntries(Highs* h, HighsInt num_set_entries,
py::cast(value));
}

std::tuple<HighsStatus, HighsVarType>
highs_getColIntegrality(Highs* h, HighsInt col) {
HighsInt col_ = static_cast<HighsInt>(col);
HighsVarType integrality;
HighsStatus status = h->getColIntegrality(col_, integrality);
return std::make_tuple(status, integrality);
}

std::tuple<HighsStatus, HighsInt, dense_array_t<double>, dense_array_t<double>,
HighsInt>
highs_getRows(Highs* h, HighsInt num_set_entries,
Expand Down Expand Up @@ -1029,11 +1037,13 @@ PYBIND11_MODULE(_core, m) {

.def("getCol", &highs_getCol)
.def("getColEntries", &highs_getColEntries)
.def("getColIntegrality", &highs_getColIntegrality)
.def("getRow", &highs_getRow)
.def("getRowEntries", &highs_getRowEntries)

.def("getCols", &highs_getCols)
.def("getColsEntries", &highs_getColsEntries)

.def("getRows", &highs_getRows)
.def("getRowsEntries", &highs_getRowsEntries)

Expand Down

0 comments on commit 3e7cd1a

Please sign in to comment.