Class: ORTools::SatIntVar

Inherits:
Object
  • Object
show all
Includes:
ComparisonOperators
Defined in:
lib/or_tools/sat_int_var.rb

Instance Method Summary collapse

Instance Method Details

#*(other) ⇒ Object



5
6
7
# File 'lib/or_tools/sat_int_var.rb', line 5

def *(other)
  SatLinearExpr.new([[self, other]])
end

#+(other) ⇒ Object



9
10
11
# File 'lib/or_tools/sat_int_var.rb', line 9

def +(other)
  SatLinearExpr.new([[self, 1], [other, 1]])
end

#-(other) ⇒ Object



13
14
15
# File 'lib/or_tools/sat_int_var.rb', line 13

def -(other)
  SatLinearExpr.new([[self, 1], [-other, 1]])
end

#-@Object



17
18
19
# File 'lib/or_tools/sat_int_var.rb', line 17

def -@
  SatLinearExpr.new([[self, -1]])
end

#inspectObject

TODO add class



26
27
28
# File 'lib/or_tools/sat_int_var.rb', line 26

def inspect
  to_s
end

#to_sObject



21
22
23
# File 'lib/or_tools/sat_int_var.rb', line 21

def to_s
  name
end