Module: Glpk

Defined in:
lib/glpk.rb,
lib/glpk/ffi.rb,
lib/glpk/problem.rb,
lib/glpk/version.rb

Defined Under Namespace

Modules: FFI Classes: Error, Problem

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.ffi_libObject

Returns the value of attribute ffi_lib.



12
13
14
# File 'lib/glpk.rb', line 12

def ffi_lib
  @ffi_lib
end

Class Method Details

.lib_versionObject



28
29
30
# File 'lib/glpk.rb', line 28

def self.lib_version
  FFI.glp_version.to_s
end

.load_problem(**options) ⇒ Object



44
45
46
47
48
# File 'lib/glpk.rb', line 44

def self.load_problem(**options)
  problem = Problem.new
  problem.load_problem(**options)
  problem
end

.read_lp(filename) ⇒ Object



32
33
34
35
36
# File 'lib/glpk.rb', line 32

def self.read_lp(filename)
  problem = Problem.new
  problem.read_lp(filename)
  problem
end

.read_mps(filename) ⇒ Object



38
39
40
41
42
# File 'lib/glpk.rb', line 38

def self.read_mps(filename)
  problem = Problem.new
  problem.read_mps(filename)
  problem
end