Class: ORTools::SatLinearExpr
- Inherits:
-
Object
- Object
- ORTools::SatLinearExpr
- Includes:
- ComparisonOperators
- Defined in:
- lib/or_tools/sat_linear_expr.rb
Instance Attribute Summary collapse
-
#vars ⇒ Object
readonly
Returns the value of attribute vars.
Instance Method Summary collapse
- #+(other) ⇒ Object
- #-(other) ⇒ Object
-
#initialize(vars = []) ⇒ SatLinearExpr
constructor
A new instance of SatLinearExpr.
Constructor Details
#initialize(vars = []) ⇒ SatLinearExpr
Returns a new instance of SatLinearExpr.
7 8 9 |
# File 'lib/or_tools/sat_linear_expr.rb', line 7 def initialize(vars = []) @vars = vars end |
Instance Attribute Details
#vars ⇒ Object (readonly)
Returns the value of attribute vars.
5 6 7 |
# File 'lib/or_tools/sat_linear_expr.rb', line 5 def vars @vars end |
Instance Method Details
#+(other) ⇒ Object
11 12 13 |
# File 'lib/or_tools/sat_linear_expr.rb', line 11 def +(other) add(other, 1) end |
#-(other) ⇒ Object
15 16 17 |
# File 'lib/or_tools/sat_linear_expr.rb', line 15 def -(other) add(other, -1) end |