Skip to content

Commit

Permalink
Removed LinearExpr from C++
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 6, 2024
1 parent 04fbbc2 commit c186217
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ext/or-tools/linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ namespace Rice::detail
void init_linear(Rice::Module& m) {
Rice::define_class_under<LinearRange>(m, "LinearRange");

auto rb_cLinearExpr = Rice::define_class_under<LinearExpr>(m, "LinearExpr");
rb_cLinearExpr.define_constructor(Rice::Constructor<LinearExpr>());
// auto rb_cLinearExpr = Rice::define_class_under<LinearExpr>(m, "LinearExpr");
// rb_cLinearExpr.define_constructor(Rice::Constructor<LinearExpr>());

Rice::define_class_under<MPVariable, LinearExpr>(m, "MPVariable")
Rice::define_class_under<MPVariable>(m, "MPVariable")
.define_method("name", &MPVariable::name)
.define_method("solution_value", &MPVariable::solution_value);

Expand Down
2 changes: 1 addition & 1 deletion test/linear_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_inspect

assert_equal "#<ORTools::MPVariable x>", x.inspect
assert_equal "#<ORTools::SumArray x + 1>", (x + 1).inspect
# assert_equal "#<ORTools::LinearExpr (empty)>", ORTools::LinearExpr.new.inspect
assert_equal "#<ORTools::LinearExpr (empty)>", ORTools::LinearExpr.new.inspect
assert_equal "#<ORTools::LinearConstraint x + 1 == 1>", (x + 1 == 1).inspect
end

Expand Down

0 comments on commit c186217

Please sign in to comment.