Skip to content

Commit

Permalink
fixup from google3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 9, 2023
1 parent 753a7ab commit 69874c9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
3 changes: 1 addition & 2 deletions ortools/algorithms/dynamic_partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <string>
#include <vector>

#include "absl/log/check.h"
#include "absl/types/span.h"
#include "ortools/base/logging.h"

namespace operations_research {

Expand Down Expand Up @@ -405,7 +405,6 @@ inline std::vector<absl::Span<const T>> SimpleDynamicPartition::GetParts(
starts.clear();
return result;
}

} // namespace operations_research

#endif // OR_TOOLS_ALGORITHMS_DYNAMIC_PARTITION_H_
6 changes: 0 additions & 6 deletions ortools/constraint_solver/python/constraint_solver.i
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ PY_CONVERT_HELPER_PTR(LocalSearchFilter);
PY_CONVERT_HELPER_PTR(LocalSearchFilterManager);
PY_CONVERT_HELPER_INTEXPR_AND_INTVAR();

%{

%}

// Actual conversions. This also includes the conversion to std::vector<Class>.
PY_CONVERT(IntVar);
PY_CONVERT(IntExpr);
Expand Down Expand Up @@ -2198,6 +2194,4 @@ class PyConstraint(Constraint):

def DebugString(self):
return "PyConstraint"


} // %pythoncode
9 changes: 2 additions & 7 deletions ortools/linear_solver/python/model_builder_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,8 @@ PYBIND11_MODULE(model_builder_helper, m) {
.def("enable_output", &ModelSolverHelper::EnableOutput, arg("output"))
.def("has_solution", &ModelSolverHelper::has_solution)
.def("has_response", &ModelSolverHelper::has_response)
.def("status",
[](const ModelSolverHelper& solver) {
// TODO(user):
// - Return the true enum when pybind11_protobuf is working.
// - Return the response proto
return static_cast<int>(solver.status());
})
.def("response", &ModelSolverHelper::response)
.def("status", &ModelSolverHelper::status)
.def("status_string", &ModelSolverHelper::status_string)
.def("wall_time", &ModelSolverHelper::wall_time)
.def("user_time", &ModelSolverHelper::user_time)
Expand Down
4 changes: 2 additions & 2 deletions ortools/lp_data/sparse_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ class SparseVector {
EntryIndex capacity_;

// Pointers to the first elements of the index and coefficient arrays.
Index* index_;
Fractional* coefficient_;
Index* index_ = nullptr;
Fractional* coefficient_ = nullptr;

// This is here to speed up the CheckNoDuplicates() methods and is mutable
// so we can perform checks on const argument.
Expand Down

0 comments on commit 69874c9

Please sign in to comment.