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

for now



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

def inspect
  name
end