module Cbc

Constants

INF
VERSION

Public Class Methods

add_all(variables) click to toggle source
# File lib/ruby-cbc/model.rb, line 4
def self.add_all(variables)
  to_add = variables.map do |variable|
    case variable
    when Numeric, Ilp::Term
      variable
    when Ilp::Var
      Ilp::Term.new(variable)
    else
      raise "Not a variable, a term or a numeric"
    end
  end
  Ilp::TermArray.new(to_add)
end