Skip to content

Commit

Permalink
protect code from swig
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Jan 19, 2025
1 parent e600bc3 commit accbc8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ortools/linear_solver/wrappers/model_builder_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
namespace operations_research {
namespace mb {

#if !defined(SWIG)
// Base implementation of linear expressions.

class BoundedLinearExpression;
Expand Down Expand Up @@ -348,6 +349,8 @@ class BoundedLinearExpression {
double upper_bound_;
};

#endif // !defined(SWIG)

// The arguments of the functions defined below must follow these rules
// to be wrapped by SWIG correctly:
// 1) Their types must include the full operations_research::
Expand Down Expand Up @@ -509,7 +512,9 @@ class ModelSolverHelper {
double objective_value() const;
double best_objective_bound() const;
double variable_value(int var_index) const;
#if !defined(SWIG)
double expression_value(std::shared_ptr<LinearExpr> expr) const;
#endif // !defined(SWIG)
double reduced_cost(int var_index) const;
double dual_value(int ct_index) const;
double activity(int ct_index);
Expand Down

0 comments on commit accbc8d

Please sign in to comment.