Class: ORTools::LinearExpr

Inherits:
Object
  • Object
show all
Defined in:
lib/or_tools/linear_expr.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/or_tools/linear_expr.rb', line 3

def +(other)
  if other.is_a?(LinearExpr)
    _add_linear_expr(other)
  else
    _add_mp_variable(other)
  end
end

#<=(other) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/or_tools/linear_expr.rb', line 19

def <=(other)
  if other.is_a?(LinearExpr)
    _lte_linear_expr(other)
  else
    _lte_double(other)
  end
end

#>=(other) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/or_tools/linear_expr.rb', line 11

def >=(other)
  if other.is_a?(LinearExpr)
    _gte_linear_expr(other)
  else
    _gte_double(other)
  end
end