Skip to content

Commit

Permalink
Added getColIntegrality to highspy
Browse files Browse the repository at this point in the history
  • Loading branch information
jajhall committed Nov 5, 2024
1 parent cc9975f commit fb7b1c7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 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 All @@ -1042,9 +1052,6 @@ PYBIND11_MODULE(_core, m) {
.def("getRowName", &highs_getRowName)
.def("getRowByName", &highs_getRowByName)

// .def("getColIntegrality", &Highs::getColIntegrality)
// .def("getColsIntegrality", &Highs::getColsIntegrality)

.def("writeModel", &Highs::writeModel)
.def("writePresolvedModel", &Highs::writePresolvedModel)
.def("crossover", &Highs::crossover)
Expand Down

0 comments on commit fb7b1c7

Please sign in to comment.