Class: ORTools::Constant
Instance Method Summary
collapse
Methods inherited from LinearExpr
#*, #+, #-, #-@, #/, #<=, #==, #>=, #coeffs, #coerce, #inspect, #solution_value
Constructor Details
#initialize(val) ⇒ Constant
3
4
5
|
# File 'lib/or_tools/constant.rb', line 3
def initialize(val)
@val = val
end
|
Instance Method Details
#add_self_to_coeff_map_or_stack(coeffs, multiplier, stack) ⇒ Object
11
12
13
|
# File 'lib/or_tools/constant.rb', line 11
def add_self_to_coeff_map_or_stack(coeffs, multiplier, stack)
coeffs[OFFSET_KEY] += @val * multiplier
end
|
#to_s ⇒ Object
7
8
9
|
# File 'lib/or_tools/constant.rb', line 7
def to_s
@val.to_s
end
|