remove non C++ leaks with the linear solver

This commit is contained in:
Laurent Perron
2020-06-25 11:15:19 +02:00
parent eda229c521
commit f0f675debd
3 changed files with 5 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ CONVERT_VECTOR(operations_research::MPVariable, MPVariable)
// Expose the MPSolver's basic API, with trivial renames when needed.
%unignore operations_research::MPSolver::MPSolver;
%unignore operations_research::MPSolver::~MPSolver;
%newobject operations_research::MPSolver::CreateSolver;
%unignore operations_research::MPSolver::CreateSolver;
%unignore operations_research::MPSolver::ParseAndCheckSupportForProblemType;
%unignore operations_research::MPSolver::MakeBoolVar;

View File

@@ -221,7 +221,9 @@ class MPSolver {
virtual ~MPSolver();
/**
* Recommended factory method to create a MPSolver instance.
* Recommended factory method to create a MPSolver instance, especially in
* non C++ languages.
*
* It returns a newly created solver instance if successful, or a nullptr
* otherwise. This can occur if the relevant interface is not linked in, or if
* a needed license is not accessible for commercial solvers.

View File

@@ -300,6 +300,7 @@ PY_CONVERT(MPVariable);
%rename (Constraint) operations_research::MPSolver::MakeRowConstraint(double, double, const std::string&);
%rename (Constraint) operations_research::MPSolver::MakeRowConstraint(const std::string&);
%unignore operations_research::MPSolver::~MPSolver;
%newobject operations_research::MPSolver::CreateSolver;
%unignore operations_research::MPSolver::CreateSolver;
%unignore operations_research::MPSolver::ParseAndCheckSupportForProblemType;
%unignore operations_research::MPSolver::Solve;