Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename rglpk.c as glpk_wrapper.c.

  • Loading branch information...
commit 0ae1654bcd8f29dc155d3d86be0bca8bcce7952b 1 parent 357f00e
@wtaysom authored
View
4 .gitignore
@@ -13,5 +13,5 @@ swig/rglpk.c
ext/Makefile
ext/conftest.dSYM/
ext/mkmf.log
-ext/rglpk.bundle
-ext/rglpk.o
+ext/glpk_wrapper.bundle
+ext/glpk_wrapper.o
View
13 Rakefile
@@ -34,12 +34,13 @@ end
SHARED_LIBRARY_EXTENSION = RUBY_PLATFORM.include?("darwin") ? 'bundle' : 'so'
-EXTENSION = 'ext/rglpk.'+SHARED_LIBRARY_EXTENSION
+EXTENSION = 'ext/glpk_wrapper.'+SHARED_LIBRARY_EXTENSION
desc "Use extconf.rb and make to build the extension."
task :build_extension => EXTENSION
-file EXTENSION => 'ext/rglpk.c' do
+file EXTENSION => 'ext/glpk_wrapper.c' do
+ puts "why am I here?"
in_dir('ext') do
system("ruby extconf.rb")
system("make")
@@ -47,9 +48,9 @@ file EXTENSION => 'ext/rglpk.c' do
end
CLEAN.include('ext/Makefile', 'ext/conftest.dSYM', 'ext/mkmf.log',
- 'ext/rglpk.bundle', 'ext/rglpk.o')
+ 'ext/glpk_wrapper.bundle', 'ext/glpk_wrapper.o')
-file 'ext/rglpk.c' => 'swig/glpk.i' do
+file 'ext/glpk_wrapper.c' => 'swig/glpk.i' do
in_dir('swig') do
system("autoconf")
system("configure")
@@ -58,9 +59,9 @@ file 'ext/rglpk.c' => 'swig/glpk.i' do
end
CLEAN.include('swig/Makefile', 'swig/autom4te.cache', 'swig/config.log',
- 'swig/config.status', 'swig/configure', 'swig/rglpk.c')
+ 'swig/config.status', 'swig/configure', 'swig/glpk_wrapper.c')
-CLOBBER.include('ext/rglpk.c')
+CLOBBER.include('ext/glpk_wrapper.c')
desc "Run Test::Unit tests."
task :test => :build_extension do
View
2  ext/extconf.rb
@@ -9,4 +9,4 @@
exit 1
end
-create_makefile("rglpk")
+create_makefile('glpk_wrapper')
View
1,136 ext/rglpk.c → ext/glpk_wrapper.c
@@ -1822,10 +1822,10 @@ static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0};
/* -------- TYPES TABLE (END) -------- */
-#define SWIG_init Init_rglpk
-#define SWIG_name "Rglpk"
+#define SWIG_init Init_glpk_wrapper
+#define SWIG_name "Glpk_wrapper"
-static VALUE mRglpk;
+static VALUE mGlpk_wrapper;
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
#define SWIG_RUBY_THREAD_END_BLOCK
@@ -20866,11 +20866,11 @@ SWIG_PropagateClientData(void) {
#ifdef __cplusplus
extern "C"
#endif
-SWIGEXPORT void Init_rglpk(void) {
+SWIGEXPORT void Init_glpk_wrapper(void) {
size_t i;
SWIG_InitRuntime();
- mRglpk = rb_define_module("Rglpk");
+ mGlpk_wrapper = rb_define_module("Glpk_wrapper");
SWIG_InitializeModule(0);
for (i = 0; i < swig_module.size; i++) {
@@ -20878,18 +20878,18 @@ SWIGEXPORT void Init_rglpk(void) {
}
SWIG_RubyInitializeTrackings();
- rb_define_module_function(mRglpk, "new_intArray", _wrap_new_intArray, -1);
- rb_define_module_function(mRglpk, "delete_intArray", _wrap_delete_intArray, -1);
- rb_define_module_function(mRglpk, "intArray_getitem", _wrap_intArray_getitem, -1);
- rb_define_module_function(mRglpk, "intArray_setitem", _wrap_intArray_setitem, -1);
- rb_define_module_function(mRglpk, "new_doubleArray", _wrap_new_doubleArray, -1);
- rb_define_module_function(mRglpk, "delete_doubleArray", _wrap_delete_doubleArray, -1);
- rb_define_module_function(mRglpk, "doubleArray_getitem", _wrap_doubleArray_getitem, -1);
- rb_define_module_function(mRglpk, "doubleArray_setitem", _wrap_doubleArray_setitem, -1);
- rb_define_const(mRglpk, "GLP_MAJOR_VERSION", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_MINOR_VERSION", SWIG_From_int((int)(44)));
-
- SwigClassGlp_prob.klass = rb_define_class_under(mRglpk, "Glp_prob", rb_cObject);
+ rb_define_module_function(mGlpk_wrapper, "new_intArray", _wrap_new_intArray, -1);
+ rb_define_module_function(mGlpk_wrapper, "delete_intArray", _wrap_delete_intArray, -1);
+ rb_define_module_function(mGlpk_wrapper, "intArray_getitem", _wrap_intArray_getitem, -1);
+ rb_define_module_function(mGlpk_wrapper, "intArray_setitem", _wrap_intArray_setitem, -1);
+ rb_define_module_function(mGlpk_wrapper, "new_doubleArray", _wrap_new_doubleArray, -1);
+ rb_define_module_function(mGlpk_wrapper, "delete_doubleArray", _wrap_delete_doubleArray, -1);
+ rb_define_module_function(mGlpk_wrapper, "doubleArray_getitem", _wrap_doubleArray_getitem, -1);
+ rb_define_module_function(mGlpk_wrapper, "doubleArray_setitem", _wrap_doubleArray_setitem, -1);
+ rb_define_const(mGlpk_wrapper, "GLP_MAJOR_VERSION", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_MINOR_VERSION", SWIG_From_int((int)(44)));
+
+ SwigClassGlp_prob.klass = rb_define_class_under(mGlpk_wrapper, "Glp_prob", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_prob, (void *) &SwigClassGlp_prob);
rb_define_alloc_func(SwigClassGlp_prob.klass, _wrap_glp_prob_allocate);
rb_define_method(SwigClassGlp_prob.klass, "initialize", _wrap_new_glp_prob, -1);
@@ -20898,40 +20898,40 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_prob.mark = 0;
SwigClassGlp_prob.destroy = (void (*)(void *)) free_glp_prob;
SwigClassGlp_prob.trackObjects = 0;
- rb_define_const(mRglpk, "GLP_MIN", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_MAX", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_CV", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_IV", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_BV", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_FR", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_LO", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_UP", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_DB", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_FX", SWIG_From_int((int)(5)));
- rb_define_const(mRglpk, "GLP_BS", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_NL", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_NU", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_NF", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_NS", SWIG_From_int((int)(5)));
- rb_define_const(mRglpk, "GLP_SF_GM", SWIG_From_int((int)(0x01)));
- rb_define_const(mRglpk, "GLP_SF_EQ", SWIG_From_int((int)(0x10)));
- rb_define_const(mRglpk, "GLP_SF_2N", SWIG_From_int((int)(0x20)));
- rb_define_const(mRglpk, "GLP_SF_SKIP", SWIG_From_int((int)(0x40)));
- rb_define_const(mRglpk, "GLP_SF_AUTO", SWIG_From_int((int)(0x80)));
- rb_define_const(mRglpk, "GLP_SOL", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_IPT", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_MIP", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_UNDEF", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_FEAS", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_INFEAS", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_NOFEAS", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_OPT", SWIG_From_int((int)(5)));
- rb_define_const(mRglpk, "GLP_UNBND", SWIG_From_int((int)(6)));
- rb_define_const(mRglpk, "GLP_BF_FT", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_BF_BG", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_BF_GR", SWIG_From_int((int)(3)));
-
- SwigClassGlp_bfcp.klass = rb_define_class_under(mRglpk, "Glp_bfcp", rb_cObject);
+ rb_define_const(mGlpk_wrapper, "GLP_MIN", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_MAX", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_CV", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_IV", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_BV", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_FR", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_LO", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_UP", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_DB", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_FX", SWIG_From_int((int)(5)));
+ rb_define_const(mGlpk_wrapper, "GLP_BS", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_NL", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_NU", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_NF", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_NS", SWIG_From_int((int)(5)));
+ rb_define_const(mGlpk_wrapper, "GLP_SF_GM", SWIG_From_int((int)(0x01)));
+ rb_define_const(mGlpk_wrapper, "GLP_SF_EQ", SWIG_From_int((int)(0x10)));
+ rb_define_const(mGlpk_wrapper, "GLP_SF_2N", SWIG_From_int((int)(0x20)));
+ rb_define_const(mGlpk_wrapper, "GLP_SF_SKIP", SWIG_From_int((int)(0x40)));
+ rb_define_const(mGlpk_wrapper, "GLP_SF_AUTO", SWIG_From_int((int)(0x80)));
+ rb_define_const(mGlpk_wrapper, "GLP_SOL", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_IPT", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_MIP", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_UNDEF", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_FEAS", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_INFEAS", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_NOFEAS", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_OPT", SWIG_From_int((int)(5)));
+ rb_define_const(mGlpk_wrapper, "GLP_UNBND", SWIG_From_int((int)(6)));
+ rb_define_const(mGlpk_wrapper, "GLP_BF_FT", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_BF_BG", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_BF_GR", SWIG_From_int((int)(3)));
+
+ SwigClassGlp_bfcp.klass = rb_define_class_under(mGlpk_wrapper, "Glp_bfcp", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_bfcp, (void *) &SwigClassGlp_bfcp);
rb_define_alloc_func(SwigClassGlp_bfcp.klass, _wrap_glp_bfcp_allocate);
rb_define_method(SwigClassGlp_bfcp.klass, "initialize", _wrap_new_glp_bfcp, -1);
@@ -20964,20 +20964,20 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_bfcp.mark = 0;
SwigClassGlp_bfcp.destroy = (void (*)(void *)) free_glp_bfcp;
SwigClassGlp_bfcp.trackObjects = 0;
- rb_define_const(mRglpk, "GLP_MSG_OFF", SWIG_From_int((int)(0)));
- rb_define_const(mRglpk, "GLP_MSG_ERR", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_MSG_ON", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_MSG_ALL", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_MSG_DBG", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_PRIMAL", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_DUALP", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_DUAL", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_PT_STD", SWIG_From_int((int)(0x11)));
- rb_define_const(mRglpk, "GLP_PT_PSE", SWIG_From_int((int)(0x22)));
- rb_define_const(mRglpk, "GLP_RT_STD", SWIG_From_int((int)(0x11)));
- rb_define_const(mRglpk, "GLP_RT_HAR", SWIG_From_int((int)(0x22)));
-
- SwigClassGlp_smcp.klass = rb_define_class_under(mRglpk, "Glp_smcp", rb_cObject);
+ rb_define_const(mGlpk_wrapper, "GLP_MSG_OFF", SWIG_From_int((int)(0)));
+ rb_define_const(mGlpk_wrapper, "GLP_MSG_ERR", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_MSG_ON", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_MSG_ALL", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_MSG_DBG", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_PRIMAL", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_DUALP", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_DUAL", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_PT_STD", SWIG_From_int((int)(0x11)));
+ rb_define_const(mGlpk_wrapper, "GLP_PT_PSE", SWIG_From_int((int)(0x22)));
+ rb_define_const(mGlpk_wrapper, "GLP_RT_STD", SWIG_From_int((int)(0x11)));
+ rb_define_const(mGlpk_wrapper, "GLP_RT_HAR", SWIG_From_int((int)(0x22)));
+
+ SwigClassGlp_smcp.klass = rb_define_class_under(mGlpk_wrapper, "Glp_smcp", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_smcp, (void *) &SwigClassGlp_smcp);
rb_define_alloc_func(SwigClassGlp_smcp.klass, _wrap_glp_smcp_allocate);
rb_define_method(SwigClassGlp_smcp.klass, "initialize", _wrap_new_glp_smcp, -1);
@@ -21014,12 +21014,12 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_smcp.mark = 0;
SwigClassGlp_smcp.destroy = (void (*)(void *)) free_glp_smcp;
SwigClassGlp_smcp.trackObjects = 0;
- rb_define_const(mRglpk, "GLP_ORD_NONE", SWIG_From_int((int)(0)));
- rb_define_const(mRglpk, "GLP_ORD_QMD", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_ORD_AMD", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_ORD_SYMAMD", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_ORD_NONE", SWIG_From_int((int)(0)));
+ rb_define_const(mGlpk_wrapper, "GLP_ORD_QMD", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_ORD_AMD", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_ORD_SYMAMD", SWIG_From_int((int)(3)));
- SwigClassGlp_iptcp.klass = rb_define_class_under(mRglpk, "Glp_iptcp", rb_cObject);
+ SwigClassGlp_iptcp.klass = rb_define_class_under(mGlpk_wrapper, "Glp_iptcp", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_iptcp, (void *) &SwigClassGlp_iptcp);
rb_define_alloc_func(SwigClassGlp_iptcp.klass, _wrap_glp_iptcp_allocate);
rb_define_method(SwigClassGlp_iptcp.klass, "initialize", _wrap_new_glp_iptcp, -1);
@@ -21033,7 +21033,7 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_iptcp.destroy = (void (*)(void *)) free_glp_iptcp;
SwigClassGlp_iptcp.trackObjects = 0;
- SwigClassGlp_tree.klass = rb_define_class_under(mRglpk, "Glp_tree", rb_cObject);
+ SwigClassGlp_tree.klass = rb_define_class_under(mGlpk_wrapper, "Glp_tree", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_tree, (void *) &SwigClassGlp_tree);
rb_define_alloc_func(SwigClassGlp_tree.klass, _wrap_glp_tree_allocate);
rb_define_method(SwigClassGlp_tree.klass, "initialize", _wrap_new_glp_tree, -1);
@@ -21042,20 +21042,20 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_tree.mark = 0;
SwigClassGlp_tree.destroy = (void (*)(void *)) free_glp_tree;
SwigClassGlp_tree.trackObjects = 0;
- rb_define_const(mRglpk, "GLP_BR_FFV", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_BR_LFV", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_BR_MFV", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_BR_DTH", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_BR_PCH", SWIG_From_int((int)(5)));
- rb_define_const(mRglpk, "GLP_BT_DFS", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_BT_BFS", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_BT_BLB", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_BT_BPH", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_PP_NONE", SWIG_From_int((int)(0)));
- rb_define_const(mRglpk, "GLP_PP_ROOT", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_PP_ALL", SWIG_From_int((int)(2)));
-
- SwigClassGlp_iocp.klass = rb_define_class_under(mRglpk, "Glp_iocp", rb_cObject);
+ rb_define_const(mGlpk_wrapper, "GLP_BR_FFV", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_BR_LFV", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_BR_MFV", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_BR_DTH", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_BR_PCH", SWIG_From_int((int)(5)));
+ rb_define_const(mGlpk_wrapper, "GLP_BT_DFS", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_BT_BFS", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_BT_BLB", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_BT_BPH", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_PP_NONE", SWIG_From_int((int)(0)));
+ rb_define_const(mGlpk_wrapper, "GLP_PP_ROOT", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_PP_ALL", SWIG_From_int((int)(2)));
+
+ SwigClassGlp_iocp.klass = rb_define_class_under(mGlpk_wrapper, "Glp_iocp", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_iocp, (void *) &SwigClassGlp_iocp);
rb_define_alloc_func(SwigClassGlp_iocp.klass, _wrap_glp_iocp_allocate);
rb_define_method(SwigClassGlp_iocp.klass, "initialize", _wrap_new_glp_iocp, -1);
@@ -21106,15 +21106,15 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_iocp.mark = 0;
SwigClassGlp_iocp.destroy = (void (*)(void *)) free_glp_iocp;
SwigClassGlp_iocp.trackObjects = 0;
- rb_define_const(mRglpk, "GLP_RF_REG", SWIG_From_int((int)(0)));
- rb_define_const(mRglpk, "GLP_RF_LAZY", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_RF_CUT", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_RF_GMI", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_RF_MIR", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_RF_COV", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_RF_CLQ", SWIG_From_int((int)(4)));
-
- SwigClassGlp_attr.klass = rb_define_class_under(mRglpk, "Glp_attr", rb_cObject);
+ rb_define_const(mGlpk_wrapper, "GLP_RF_REG", SWIG_From_int((int)(0)));
+ rb_define_const(mGlpk_wrapper, "GLP_RF_LAZY", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_RF_CUT", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_RF_GMI", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_RF_MIR", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_RF_COV", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_RF_CLQ", SWIG_From_int((int)(4)));
+
+ SwigClassGlp_attr.klass = rb_define_class_under(mGlpk_wrapper, "Glp_attr", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_attr, (void *) &SwigClassGlp_attr);
rb_define_alloc_func(SwigClassGlp_attr.klass, _wrap_glp_attr_allocate);
rb_define_method(SwigClassGlp_attr.klass, "initialize", _wrap_new_glp_attr, -1);
@@ -21129,46 +21129,46 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_attr.mark = 0;
SwigClassGlp_attr.destroy = (void (*)(void *)) free_glp_attr;
SwigClassGlp_attr.trackObjects = 0;
- rb_define_const(mRglpk, "GLP_ON", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_OFF", SWIG_From_int((int)(0)));
- rb_define_const(mRglpk, "GLP_IROWGEN", SWIG_From_int((int)(0x01)));
- rb_define_const(mRglpk, "GLP_IBINGO", SWIG_From_int((int)(0x02)));
- rb_define_const(mRglpk, "GLP_IHEUR", SWIG_From_int((int)(0x03)));
- rb_define_const(mRglpk, "GLP_ICUTGEN", SWIG_From_int((int)(0x04)));
- rb_define_const(mRglpk, "GLP_IBRANCH", SWIG_From_int((int)(0x05)));
- rb_define_const(mRglpk, "GLP_ISELECT", SWIG_From_int((int)(0x06)));
- rb_define_const(mRglpk, "GLP_IPREPRO", SWIG_From_int((int)(0x07)));
- rb_define_const(mRglpk, "GLP_NO_BRNCH", SWIG_From_int((int)(0)));
- rb_define_const(mRglpk, "GLP_DN_BRNCH", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_UP_BRNCH", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_EBADB", SWIG_From_int((int)(0x01)));
- rb_define_const(mRglpk, "GLP_ESING", SWIG_From_int((int)(0x02)));
- rb_define_const(mRglpk, "GLP_ECOND", SWIG_From_int((int)(0x03)));
- rb_define_const(mRglpk, "GLP_EBOUND", SWIG_From_int((int)(0x04)));
- rb_define_const(mRglpk, "GLP_EFAIL", SWIG_From_int((int)(0x05)));
- rb_define_const(mRglpk, "GLP_EOBJLL", SWIG_From_int((int)(0x06)));
- rb_define_const(mRglpk, "GLP_EOBJUL", SWIG_From_int((int)(0x07)));
- rb_define_const(mRglpk, "GLP_EITLIM", SWIG_From_int((int)(0x08)));
- rb_define_const(mRglpk, "GLP_ETMLIM", SWIG_From_int((int)(0x09)));
- rb_define_const(mRglpk, "GLP_ENOPFS", SWIG_From_int((int)(0x0A)));
- rb_define_const(mRglpk, "GLP_ENODFS", SWIG_From_int((int)(0x0B)));
- rb_define_const(mRglpk, "GLP_EROOT", SWIG_From_int((int)(0x0C)));
- rb_define_const(mRglpk, "GLP_ESTOP", SWIG_From_int((int)(0x0D)));
- rb_define_const(mRglpk, "GLP_EMIPGAP", SWIG_From_int((int)(0x0E)));
- rb_define_const(mRglpk, "GLP_ENOFEAS", SWIG_From_int((int)(0x0F)));
- rb_define_const(mRglpk, "GLP_ENOCVG", SWIG_From_int((int)(0x10)));
- rb_define_const(mRglpk, "GLP_EINSTAB", SWIG_From_int((int)(0x11)));
- rb_define_const(mRglpk, "GLP_EDATA", SWIG_From_int((int)(0x12)));
- rb_define_const(mRglpk, "GLP_ERANGE", SWIG_From_int((int)(0x13)));
- rb_define_const(mRglpk, "GLP_KKT_PE", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_KKT_PB", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_KKT_DE", SWIG_From_int((int)(3)));
- rb_define_const(mRglpk, "GLP_KKT_DB", SWIG_From_int((int)(4)));
- rb_define_const(mRglpk, "GLP_KKT_CS", SWIG_From_int((int)(5)));
- rb_define_const(mRglpk, "GLP_MPS_DECK", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_MPS_FILE", SWIG_From_int((int)(2)));
-
- SwigClassGlp_mpscp.klass = rb_define_class_under(mRglpk, "Glp_mpscp", rb_cObject);
+ rb_define_const(mGlpk_wrapper, "GLP_ON", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_OFF", SWIG_From_int((int)(0)));
+ rb_define_const(mGlpk_wrapper, "GLP_IROWGEN", SWIG_From_int((int)(0x01)));
+ rb_define_const(mGlpk_wrapper, "GLP_IBINGO", SWIG_From_int((int)(0x02)));
+ rb_define_const(mGlpk_wrapper, "GLP_IHEUR", SWIG_From_int((int)(0x03)));
+ rb_define_const(mGlpk_wrapper, "GLP_ICUTGEN", SWIG_From_int((int)(0x04)));
+ rb_define_const(mGlpk_wrapper, "GLP_IBRANCH", SWIG_From_int((int)(0x05)));
+ rb_define_const(mGlpk_wrapper, "GLP_ISELECT", SWIG_From_int((int)(0x06)));
+ rb_define_const(mGlpk_wrapper, "GLP_IPREPRO", SWIG_From_int((int)(0x07)));
+ rb_define_const(mGlpk_wrapper, "GLP_NO_BRNCH", SWIG_From_int((int)(0)));
+ rb_define_const(mGlpk_wrapper, "GLP_DN_BRNCH", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_UP_BRNCH", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_EBADB", SWIG_From_int((int)(0x01)));
+ rb_define_const(mGlpk_wrapper, "GLP_ESING", SWIG_From_int((int)(0x02)));
+ rb_define_const(mGlpk_wrapper, "GLP_ECOND", SWIG_From_int((int)(0x03)));
+ rb_define_const(mGlpk_wrapper, "GLP_EBOUND", SWIG_From_int((int)(0x04)));
+ rb_define_const(mGlpk_wrapper, "GLP_EFAIL", SWIG_From_int((int)(0x05)));
+ rb_define_const(mGlpk_wrapper, "GLP_EOBJLL", SWIG_From_int((int)(0x06)));
+ rb_define_const(mGlpk_wrapper, "GLP_EOBJUL", SWIG_From_int((int)(0x07)));
+ rb_define_const(mGlpk_wrapper, "GLP_EITLIM", SWIG_From_int((int)(0x08)));
+ rb_define_const(mGlpk_wrapper, "GLP_ETMLIM", SWIG_From_int((int)(0x09)));
+ rb_define_const(mGlpk_wrapper, "GLP_ENOPFS", SWIG_From_int((int)(0x0A)));
+ rb_define_const(mGlpk_wrapper, "GLP_ENODFS", SWIG_From_int((int)(0x0B)));
+ rb_define_const(mGlpk_wrapper, "GLP_EROOT", SWIG_From_int((int)(0x0C)));
+ rb_define_const(mGlpk_wrapper, "GLP_ESTOP", SWIG_From_int((int)(0x0D)));
+ rb_define_const(mGlpk_wrapper, "GLP_EMIPGAP", SWIG_From_int((int)(0x0E)));
+ rb_define_const(mGlpk_wrapper, "GLP_ENOFEAS", SWIG_From_int((int)(0x0F)));
+ rb_define_const(mGlpk_wrapper, "GLP_ENOCVG", SWIG_From_int((int)(0x10)));
+ rb_define_const(mGlpk_wrapper, "GLP_EINSTAB", SWIG_From_int((int)(0x11)));
+ rb_define_const(mGlpk_wrapper, "GLP_EDATA", SWIG_From_int((int)(0x12)));
+ rb_define_const(mGlpk_wrapper, "GLP_ERANGE", SWIG_From_int((int)(0x13)));
+ rb_define_const(mGlpk_wrapper, "GLP_KKT_PE", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_KKT_PB", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_KKT_DE", SWIG_From_int((int)(3)));
+ rb_define_const(mGlpk_wrapper, "GLP_KKT_DB", SWIG_From_int((int)(4)));
+ rb_define_const(mGlpk_wrapper, "GLP_KKT_CS", SWIG_From_int((int)(5)));
+ rb_define_const(mGlpk_wrapper, "GLP_MPS_DECK", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_MPS_FILE", SWIG_From_int((int)(2)));
+
+ SwigClassGlp_mpscp.klass = rb_define_class_under(mGlpk_wrapper, "Glp_mpscp", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_mpscp, (void *) &SwigClassGlp_mpscp);
rb_define_alloc_func(SwigClassGlp_mpscp.klass, _wrap_glp_mpscp_allocate);
rb_define_method(SwigClassGlp_mpscp.klass, "initialize", _wrap_new_glp_mpscp, -1);
@@ -21184,7 +21184,7 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_mpscp.destroy = (void (*)(void *)) free_glp_mpscp;
SwigClassGlp_mpscp.trackObjects = 0;
- SwigClassGlp_cpxcp.klass = rb_define_class_under(mRglpk, "Glp_cpxcp", rb_cObject);
+ SwigClassGlp_cpxcp.klass = rb_define_class_under(mGlpk_wrapper, "Glp_cpxcp", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_cpxcp, (void *) &SwigClassGlp_cpxcp);
rb_define_alloc_func(SwigClassGlp_cpxcp.klass, _wrap_glp_cpxcp_allocate);
rb_define_method(SwigClassGlp_cpxcp.klass, "initialize", _wrap_new_glp_cpxcp, -1);
@@ -21194,7 +21194,7 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_cpxcp.destroy = (void (*)(void *)) free_glp_cpxcp;
SwigClassGlp_cpxcp.trackObjects = 0;
- SwigClassGlp_tran.klass = rb_define_class_under(mRglpk, "Glp_tran", rb_cObject);
+ SwigClassGlp_tran.klass = rb_define_class_under(mGlpk_wrapper, "Glp_tran", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_tran, (void *) &SwigClassGlp_tran);
rb_define_alloc_func(SwigClassGlp_tran.klass, _wrap_glp_tran_allocate);
rb_define_method(SwigClassGlp_tran.klass, "initialize", _wrap_new_glp_tran, -1);
@@ -21203,160 +21203,160 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_tran.mark = 0;
SwigClassGlp_tran.destroy = (void (*)(void *)) free_glp_tran;
SwigClassGlp_tran.trackObjects = 0;
- rb_define_module_function(mRglpk, "glp_create_prob", _wrap_glp_create_prob, -1);
- rb_define_module_function(mRglpk, "glp_set_prob_name", _wrap_glp_set_prob_name, -1);
- rb_define_module_function(mRglpk, "glp_set_obj_name", _wrap_glp_set_obj_name, -1);
- rb_define_module_function(mRglpk, "glp_set_obj_dir", _wrap_glp_set_obj_dir, -1);
- rb_define_module_function(mRglpk, "glp_add_rows", _wrap_glp_add_rows, -1);
- rb_define_module_function(mRglpk, "glp_add_cols", _wrap_glp_add_cols, -1);
- rb_define_module_function(mRglpk, "glp_set_row_name", _wrap_glp_set_row_name, -1);
- rb_define_module_function(mRglpk, "glp_set_col_name", _wrap_glp_set_col_name, -1);
- rb_define_module_function(mRglpk, "glp_set_row_bnds", _wrap_glp_set_row_bnds, -1);
- rb_define_module_function(mRglpk, "glp_set_col_bnds", _wrap_glp_set_col_bnds, -1);
- rb_define_module_function(mRglpk, "glp_set_obj_coef", _wrap_glp_set_obj_coef, -1);
- rb_define_module_function(mRglpk, "glp_set_mat_row", _wrap_glp_set_mat_row, -1);
- rb_define_module_function(mRglpk, "glp_set_mat_col", _wrap_glp_set_mat_col, -1);
- rb_define_module_function(mRglpk, "glp_load_matrix", _wrap_glp_load_matrix, -1);
- rb_define_module_function(mRglpk, "glp_check_dup", _wrap_glp_check_dup, -1);
- rb_define_module_function(mRglpk, "glp_sort_matrix", _wrap_glp_sort_matrix, -1);
- rb_define_module_function(mRglpk, "glp_del_rows", _wrap_glp_del_rows, -1);
- rb_define_module_function(mRglpk, "glp_del_cols", _wrap_glp_del_cols, -1);
- rb_define_module_function(mRglpk, "glp_copy_prob", _wrap_glp_copy_prob, -1);
- rb_define_module_function(mRglpk, "glp_erase_prob", _wrap_glp_erase_prob, -1);
- rb_define_module_function(mRglpk, "glp_delete_prob", _wrap_glp_delete_prob, -1);
- rb_define_module_function(mRglpk, "glp_get_prob_name", _wrap_glp_get_prob_name, -1);
- rb_define_module_function(mRglpk, "glp_get_obj_name", _wrap_glp_get_obj_name, -1);
- rb_define_module_function(mRglpk, "glp_get_obj_dir", _wrap_glp_get_obj_dir, -1);
- rb_define_module_function(mRglpk, "glp_get_num_rows", _wrap_glp_get_num_rows, -1);
- rb_define_module_function(mRglpk, "glp_get_num_cols", _wrap_glp_get_num_cols, -1);
- rb_define_module_function(mRglpk, "glp_get_row_name", _wrap_glp_get_row_name, -1);
- rb_define_module_function(mRglpk, "glp_get_col_name", _wrap_glp_get_col_name, -1);
- rb_define_module_function(mRglpk, "glp_get_row_type", _wrap_glp_get_row_type, -1);
- rb_define_module_function(mRglpk, "glp_get_row_lb", _wrap_glp_get_row_lb, -1);
- rb_define_module_function(mRglpk, "glp_get_row_ub", _wrap_glp_get_row_ub, -1);
- rb_define_module_function(mRglpk, "glp_get_col_type", _wrap_glp_get_col_type, -1);
- rb_define_module_function(mRglpk, "glp_get_col_lb", _wrap_glp_get_col_lb, -1);
- rb_define_module_function(mRglpk, "glp_get_col_ub", _wrap_glp_get_col_ub, -1);
- rb_define_module_function(mRglpk, "glp_get_obj_coef", _wrap_glp_get_obj_coef, -1);
- rb_define_module_function(mRglpk, "glp_get_num_nz", _wrap_glp_get_num_nz, -1);
- rb_define_module_function(mRglpk, "glp_get_mat_row", _wrap_glp_get_mat_row, -1);
- rb_define_module_function(mRglpk, "glp_get_mat_col", _wrap_glp_get_mat_col, -1);
- rb_define_module_function(mRglpk, "glp_create_index", _wrap_glp_create_index, -1);
- rb_define_module_function(mRglpk, "glp_find_row", _wrap_glp_find_row, -1);
- rb_define_module_function(mRglpk, "glp_find_col", _wrap_glp_find_col, -1);
- rb_define_module_function(mRglpk, "glp_delete_index", _wrap_glp_delete_index, -1);
- rb_define_module_function(mRglpk, "glp_set_rii", _wrap_glp_set_rii, -1);
- rb_define_module_function(mRglpk, "glp_set_sjj", _wrap_glp_set_sjj, -1);
- rb_define_module_function(mRglpk, "glp_get_rii", _wrap_glp_get_rii, -1);
- rb_define_module_function(mRglpk, "glp_get_sjj", _wrap_glp_get_sjj, -1);
- rb_define_module_function(mRglpk, "glp_scale_prob", _wrap_glp_scale_prob, -1);
- rb_define_module_function(mRglpk, "glp_unscale_prob", _wrap_glp_unscale_prob, -1);
- rb_define_module_function(mRglpk, "glp_set_row_stat", _wrap_glp_set_row_stat, -1);
- rb_define_module_function(mRglpk, "glp_set_col_stat", _wrap_glp_set_col_stat, -1);
- rb_define_module_function(mRglpk, "glp_std_basis", _wrap_glp_std_basis, -1);
- rb_define_module_function(mRglpk, "glp_adv_basis", _wrap_glp_adv_basis, -1);
- rb_define_module_function(mRglpk, "glp_cpx_basis", _wrap_glp_cpx_basis, -1);
- rb_define_module_function(mRglpk, "glp_simplex", _wrap_glp_simplex, -1);
- rb_define_module_function(mRglpk, "glp_exact", _wrap_glp_exact, -1);
- rb_define_module_function(mRglpk, "glp_init_smcp", _wrap_glp_init_smcp, -1);
- rb_define_module_function(mRglpk, "glp_get_status", _wrap_glp_get_status, -1);
- rb_define_module_function(mRglpk, "glp_get_prim_stat", _wrap_glp_get_prim_stat, -1);
- rb_define_module_function(mRglpk, "glp_get_dual_stat", _wrap_glp_get_dual_stat, -1);
- rb_define_module_function(mRglpk, "glp_get_obj_val", _wrap_glp_get_obj_val, -1);
- rb_define_module_function(mRglpk, "glp_get_row_stat", _wrap_glp_get_row_stat, -1);
- rb_define_module_function(mRglpk, "glp_get_row_prim", _wrap_glp_get_row_prim, -1);
- rb_define_module_function(mRglpk, "glp_get_row_dual", _wrap_glp_get_row_dual, -1);
- rb_define_module_function(mRglpk, "glp_get_col_stat", _wrap_glp_get_col_stat, -1);
- rb_define_module_function(mRglpk, "glp_get_col_prim", _wrap_glp_get_col_prim, -1);
- rb_define_module_function(mRglpk, "glp_get_col_dual", _wrap_glp_get_col_dual, -1);
- rb_define_module_function(mRglpk, "glp_get_unbnd_ray", _wrap_glp_get_unbnd_ray, -1);
- rb_define_module_function(mRglpk, "glp_interior", _wrap_glp_interior, -1);
- rb_define_module_function(mRglpk, "glp_init_iptcp", _wrap_glp_init_iptcp, -1);
- rb_define_module_function(mRglpk, "glp_ipt_status", _wrap_glp_ipt_status, -1);
- rb_define_module_function(mRglpk, "glp_ipt_obj_val", _wrap_glp_ipt_obj_val, -1);
- rb_define_module_function(mRglpk, "glp_ipt_row_prim", _wrap_glp_ipt_row_prim, -1);
- rb_define_module_function(mRglpk, "glp_ipt_row_dual", _wrap_glp_ipt_row_dual, -1);
- rb_define_module_function(mRglpk, "glp_ipt_col_prim", _wrap_glp_ipt_col_prim, -1);
- rb_define_module_function(mRglpk, "glp_ipt_col_dual", _wrap_glp_ipt_col_dual, -1);
- rb_define_module_function(mRglpk, "glp_set_col_kind", _wrap_glp_set_col_kind, -1);
- rb_define_module_function(mRglpk, "glp_get_col_kind", _wrap_glp_get_col_kind, -1);
- rb_define_module_function(mRglpk, "glp_get_num_int", _wrap_glp_get_num_int, -1);
- rb_define_module_function(mRglpk, "glp_get_num_bin", _wrap_glp_get_num_bin, -1);
- rb_define_module_function(mRglpk, "glp_intopt", _wrap_glp_intopt, -1);
- rb_define_module_function(mRglpk, "glp_init_iocp", _wrap_glp_init_iocp, -1);
- rb_define_module_function(mRglpk, "glp_mip_status", _wrap_glp_mip_status, -1);
- rb_define_module_function(mRglpk, "glp_mip_obj_val", _wrap_glp_mip_obj_val, -1);
- rb_define_module_function(mRglpk, "glp_mip_row_val", _wrap_glp_mip_row_val, -1);
- rb_define_module_function(mRglpk, "glp_mip_col_val", _wrap_glp_mip_col_val, -1);
- rb_define_module_function(mRglpk, "glp_print_sol", _wrap_glp_print_sol, -1);
- rb_define_module_function(mRglpk, "glp_read_sol", _wrap_glp_read_sol, -1);
- rb_define_module_function(mRglpk, "glp_write_sol", _wrap_glp_write_sol, -1);
- rb_define_module_function(mRglpk, "glp_print_ranges", _wrap_glp_print_ranges, -1);
- rb_define_module_function(mRglpk, "glp_print_ipt", _wrap_glp_print_ipt, -1);
- rb_define_module_function(mRglpk, "glp_read_ipt", _wrap_glp_read_ipt, -1);
- rb_define_module_function(mRglpk, "glp_write_ipt", _wrap_glp_write_ipt, -1);
- rb_define_module_function(mRglpk, "glp_print_mip", _wrap_glp_print_mip, -1);
- rb_define_module_function(mRglpk, "glp_read_mip", _wrap_glp_read_mip, -1);
- rb_define_module_function(mRglpk, "glp_write_mip", _wrap_glp_write_mip, -1);
- rb_define_module_function(mRglpk, "glp_bf_exists", _wrap_glp_bf_exists, -1);
- rb_define_module_function(mRglpk, "glp_factorize", _wrap_glp_factorize, -1);
- rb_define_module_function(mRglpk, "glp_bf_updated", _wrap_glp_bf_updated, -1);
- rb_define_module_function(mRglpk, "glp_get_bfcp", _wrap_glp_get_bfcp, -1);
- rb_define_module_function(mRglpk, "glp_set_bfcp", _wrap_glp_set_bfcp, -1);
- rb_define_module_function(mRglpk, "glp_get_bhead", _wrap_glp_get_bhead, -1);
- rb_define_module_function(mRglpk, "glp_get_row_bind", _wrap_glp_get_row_bind, -1);
- rb_define_module_function(mRglpk, "glp_get_col_bind", _wrap_glp_get_col_bind, -1);
- rb_define_module_function(mRglpk, "glp_ftran", _wrap_glp_ftran, -1);
- rb_define_module_function(mRglpk, "glp_btran", _wrap_glp_btran, -1);
- rb_define_module_function(mRglpk, "glp_warm_up", _wrap_glp_warm_up, -1);
- rb_define_module_function(mRglpk, "glp_eval_tab_row", _wrap_glp_eval_tab_row, -1);
- rb_define_module_function(mRglpk, "glp_eval_tab_col", _wrap_glp_eval_tab_col, -1);
- rb_define_module_function(mRglpk, "glp_transform_row", _wrap_glp_transform_row, -1);
- rb_define_module_function(mRglpk, "glp_transform_col", _wrap_glp_transform_col, -1);
- rb_define_module_function(mRglpk, "glp_prim_rtest", _wrap_glp_prim_rtest, -1);
- rb_define_module_function(mRglpk, "glp_dual_rtest", _wrap_glp_dual_rtest, -1);
- rb_define_module_function(mRglpk, "glp_analyze_bound", _wrap_glp_analyze_bound, -1);
- rb_define_module_function(mRglpk, "glp_analyze_coef", _wrap_glp_analyze_coef, -1);
- rb_define_module_function(mRglpk, "glp_ios_reason", _wrap_glp_ios_reason, -1);
- rb_define_module_function(mRglpk, "glp_ios_get_prob", _wrap_glp_ios_get_prob, -1);
- rb_define_module_function(mRglpk, "glp_ios_tree_size", _wrap_glp_ios_tree_size, -1);
- rb_define_module_function(mRglpk, "glp_ios_curr_node", _wrap_glp_ios_curr_node, -1);
- rb_define_module_function(mRglpk, "glp_ios_next_node", _wrap_glp_ios_next_node, -1);
- rb_define_module_function(mRglpk, "glp_ios_prev_node", _wrap_glp_ios_prev_node, -1);
- rb_define_module_function(mRglpk, "glp_ios_up_node", _wrap_glp_ios_up_node, -1);
- rb_define_module_function(mRglpk, "glp_ios_node_level", _wrap_glp_ios_node_level, -1);
- rb_define_module_function(mRglpk, "glp_ios_node_bound", _wrap_glp_ios_node_bound, -1);
- rb_define_module_function(mRglpk, "glp_ios_best_node", _wrap_glp_ios_best_node, -1);
- rb_define_module_function(mRglpk, "glp_ios_mip_gap", _wrap_glp_ios_mip_gap, -1);
- rb_define_module_function(mRglpk, "glp_ios_node_data", _wrap_glp_ios_node_data, -1);
- rb_define_module_function(mRglpk, "glp_ios_row_attr", _wrap_glp_ios_row_attr, -1);
- rb_define_module_function(mRglpk, "glp_ios_pool_size", _wrap_glp_ios_pool_size, -1);
- rb_define_module_function(mRglpk, "glp_ios_add_row", _wrap_glp_ios_add_row, -1);
- rb_define_module_function(mRglpk, "glp_ios_del_row", _wrap_glp_ios_del_row, -1);
- rb_define_module_function(mRglpk, "glp_ios_clear_pool", _wrap_glp_ios_clear_pool, -1);
- rb_define_module_function(mRglpk, "glp_ios_can_branch", _wrap_glp_ios_can_branch, -1);
- rb_define_module_function(mRglpk, "glp_ios_branch_upon", _wrap_glp_ios_branch_upon, -1);
- rb_define_module_function(mRglpk, "glp_ios_select_node", _wrap_glp_ios_select_node, -1);
- rb_define_module_function(mRglpk, "glp_ios_heur_sol", _wrap_glp_ios_heur_sol, -1);
- rb_define_module_function(mRglpk, "glp_ios_terminate", _wrap_glp_ios_terminate, -1);
- rb_define_module_function(mRglpk, "glp_init_mpscp", _wrap_glp_init_mpscp, -1);
- rb_define_module_function(mRglpk, "glp_read_mps", _wrap_glp_read_mps, -1);
- rb_define_module_function(mRglpk, "glp_write_mps", _wrap_glp_write_mps, -1);
- rb_define_module_function(mRglpk, "glp_init_cpxcp", _wrap_glp_init_cpxcp, -1);
- rb_define_module_function(mRglpk, "glp_read_lp", _wrap_glp_read_lp, -1);
- rb_define_module_function(mRglpk, "glp_write_lp", _wrap_glp_write_lp, -1);
- rb_define_module_function(mRglpk, "glp_read_prob", _wrap_glp_read_prob, -1);
- rb_define_module_function(mRglpk, "glp_write_prob", _wrap_glp_write_prob, -1);
- rb_define_module_function(mRglpk, "glp_mpl_alloc_wksp", _wrap_glp_mpl_alloc_wksp, -1);
- rb_define_module_function(mRglpk, "glp_mpl_read_model", _wrap_glp_mpl_read_model, -1);
- rb_define_module_function(mRglpk, "glp_mpl_read_data", _wrap_glp_mpl_read_data, -1);
- rb_define_module_function(mRglpk, "glp_mpl_generate", _wrap_glp_mpl_generate, -1);
- rb_define_module_function(mRglpk, "glp_mpl_build_prob", _wrap_glp_mpl_build_prob, -1);
- rb_define_module_function(mRglpk, "glp_mpl_postsolve", _wrap_glp_mpl_postsolve, -1);
- rb_define_module_function(mRglpk, "glp_mpl_free_wksp", _wrap_glp_mpl_free_wksp, -1);
- rb_define_module_function(mRglpk, "glp_main", _wrap_glp_main, -1);
-
- SwigClassGlp_long.klass = rb_define_class_under(mRglpk, "Glp_long", rb_cObject);
+ rb_define_module_function(mGlpk_wrapper, "glp_create_prob", _wrap_glp_create_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_prob_name", _wrap_glp_set_prob_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_obj_name", _wrap_glp_set_obj_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_obj_dir", _wrap_glp_set_obj_dir, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_add_rows", _wrap_glp_add_rows, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_add_cols", _wrap_glp_add_cols, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_row_name", _wrap_glp_set_row_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_col_name", _wrap_glp_set_col_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_row_bnds", _wrap_glp_set_row_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_col_bnds", _wrap_glp_set_col_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_obj_coef", _wrap_glp_set_obj_coef, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_mat_row", _wrap_glp_set_mat_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_mat_col", _wrap_glp_set_mat_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_load_matrix", _wrap_glp_load_matrix, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_check_dup", _wrap_glp_check_dup, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sort_matrix", _wrap_glp_sort_matrix, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_del_rows", _wrap_glp_del_rows, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_del_cols", _wrap_glp_del_cols, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_copy_prob", _wrap_glp_copy_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_erase_prob", _wrap_glp_erase_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_delete_prob", _wrap_glp_delete_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_prob_name", _wrap_glp_get_prob_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_obj_name", _wrap_glp_get_obj_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_obj_dir", _wrap_glp_get_obj_dir, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_num_rows", _wrap_glp_get_num_rows, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_num_cols", _wrap_glp_get_num_cols, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_name", _wrap_glp_get_row_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_name", _wrap_glp_get_col_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_type", _wrap_glp_get_row_type, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_lb", _wrap_glp_get_row_lb, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_ub", _wrap_glp_get_row_ub, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_type", _wrap_glp_get_col_type, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_lb", _wrap_glp_get_col_lb, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_ub", _wrap_glp_get_col_ub, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_obj_coef", _wrap_glp_get_obj_coef, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_num_nz", _wrap_glp_get_num_nz, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_mat_row", _wrap_glp_get_mat_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_mat_col", _wrap_glp_get_mat_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_create_index", _wrap_glp_create_index, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_find_row", _wrap_glp_find_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_find_col", _wrap_glp_find_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_delete_index", _wrap_glp_delete_index, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_rii", _wrap_glp_set_rii, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_sjj", _wrap_glp_set_sjj, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_rii", _wrap_glp_get_rii, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_sjj", _wrap_glp_get_sjj, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_scale_prob", _wrap_glp_scale_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_unscale_prob", _wrap_glp_unscale_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_row_stat", _wrap_glp_set_row_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_col_stat", _wrap_glp_set_col_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_std_basis", _wrap_glp_std_basis, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_adv_basis", _wrap_glp_adv_basis, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_cpx_basis", _wrap_glp_cpx_basis, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_simplex", _wrap_glp_simplex, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_exact", _wrap_glp_exact, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_init_smcp", _wrap_glp_init_smcp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_status", _wrap_glp_get_status, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_prim_stat", _wrap_glp_get_prim_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_dual_stat", _wrap_glp_get_dual_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_obj_val", _wrap_glp_get_obj_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_stat", _wrap_glp_get_row_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_prim", _wrap_glp_get_row_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_dual", _wrap_glp_get_row_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_stat", _wrap_glp_get_col_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_prim", _wrap_glp_get_col_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_dual", _wrap_glp_get_col_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_unbnd_ray", _wrap_glp_get_unbnd_ray, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_interior", _wrap_glp_interior, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_init_iptcp", _wrap_glp_init_iptcp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ipt_status", _wrap_glp_ipt_status, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ipt_obj_val", _wrap_glp_ipt_obj_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ipt_row_prim", _wrap_glp_ipt_row_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ipt_row_dual", _wrap_glp_ipt_row_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ipt_col_prim", _wrap_glp_ipt_col_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ipt_col_dual", _wrap_glp_ipt_col_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_col_kind", _wrap_glp_set_col_kind, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_kind", _wrap_glp_get_col_kind, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_num_int", _wrap_glp_get_num_int, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_num_bin", _wrap_glp_get_num_bin, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_intopt", _wrap_glp_intopt, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_init_iocp", _wrap_glp_init_iocp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mip_status", _wrap_glp_mip_status, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mip_obj_val", _wrap_glp_mip_obj_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mip_row_val", _wrap_glp_mip_row_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mip_col_val", _wrap_glp_mip_col_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_print_sol", _wrap_glp_print_sol, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_sol", _wrap_glp_read_sol, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_sol", _wrap_glp_write_sol, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_print_ranges", _wrap_glp_print_ranges, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_print_ipt", _wrap_glp_print_ipt, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_ipt", _wrap_glp_read_ipt, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_ipt", _wrap_glp_write_ipt, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_print_mip", _wrap_glp_print_mip, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_mip", _wrap_glp_read_mip, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_mip", _wrap_glp_write_mip, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_bf_exists", _wrap_glp_bf_exists, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_factorize", _wrap_glp_factorize, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_bf_updated", _wrap_glp_bf_updated, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_bfcp", _wrap_glp_get_bfcp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_bfcp", _wrap_glp_set_bfcp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_bhead", _wrap_glp_get_bhead, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_row_bind", _wrap_glp_get_row_bind, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_get_col_bind", _wrap_glp_get_col_bind, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ftran", _wrap_glp_ftran, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_btran", _wrap_glp_btran, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_warm_up", _wrap_glp_warm_up, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_eval_tab_row", _wrap_glp_eval_tab_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_eval_tab_col", _wrap_glp_eval_tab_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_transform_row", _wrap_glp_transform_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_transform_col", _wrap_glp_transform_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_prim_rtest", _wrap_glp_prim_rtest, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_dual_rtest", _wrap_glp_dual_rtest, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_analyze_bound", _wrap_glp_analyze_bound, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_analyze_coef", _wrap_glp_analyze_coef, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_reason", _wrap_glp_ios_reason, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_get_prob", _wrap_glp_ios_get_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_tree_size", _wrap_glp_ios_tree_size, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_curr_node", _wrap_glp_ios_curr_node, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_next_node", _wrap_glp_ios_next_node, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_prev_node", _wrap_glp_ios_prev_node, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_up_node", _wrap_glp_ios_up_node, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_node_level", _wrap_glp_ios_node_level, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_node_bound", _wrap_glp_ios_node_bound, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_best_node", _wrap_glp_ios_best_node, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_mip_gap", _wrap_glp_ios_mip_gap, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_node_data", _wrap_glp_ios_node_data, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_row_attr", _wrap_glp_ios_row_attr, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_pool_size", _wrap_glp_ios_pool_size, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_add_row", _wrap_glp_ios_add_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_del_row", _wrap_glp_ios_del_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_clear_pool", _wrap_glp_ios_clear_pool, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_can_branch", _wrap_glp_ios_can_branch, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_branch_upon", _wrap_glp_ios_branch_upon, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_select_node", _wrap_glp_ios_select_node, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_heur_sol", _wrap_glp_ios_heur_sol, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_ios_terminate", _wrap_glp_ios_terminate, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_init_mpscp", _wrap_glp_init_mpscp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_mps", _wrap_glp_read_mps, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_mps", _wrap_glp_write_mps, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_init_cpxcp", _wrap_glp_init_cpxcp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_lp", _wrap_glp_read_lp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_lp", _wrap_glp_write_lp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_prob", _wrap_glp_read_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_prob", _wrap_glp_write_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_alloc_wksp", _wrap_glp_mpl_alloc_wksp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_read_model", _wrap_glp_mpl_read_model, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_read_data", _wrap_glp_mpl_read_data, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_generate", _wrap_glp_mpl_generate, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_build_prob", _wrap_glp_mpl_build_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_postsolve", _wrap_glp_mpl_postsolve, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mpl_free_wksp", _wrap_glp_mpl_free_wksp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_main", _wrap_glp_main, -1);
+
+ SwigClassGlp_long.klass = rb_define_class_under(mGlpk_wrapper, "Glp_long", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_long, (void *) &SwigClassGlp_long);
rb_define_alloc_func(SwigClassGlp_long.klass, _wrap_glp_long_allocate);
rb_define_method(SwigClassGlp_long.klass, "initialize", _wrap_new_glp_long, -1);
@@ -21367,26 +21367,26 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_long.mark = 0;
SwigClassGlp_long.destroy = (void (*)(void *)) free_glp_long;
SwigClassGlp_long.trackObjects = 0;
- rb_define_module_function(mRglpk, "glp_init_env", _wrap_glp_init_env, -1);
- rb_define_module_function(mRglpk, "glp_version", _wrap_glp_version, -1);
- rb_define_module_function(mRglpk, "glp_free_env", _wrap_glp_free_env, -1);
- rb_define_module_function(mRglpk, "glp_printf", _wrap_glp_printf, -1);
- rb_define_module_function(mRglpk, "glp_term_out", _wrap_glp_term_out, -1);
- rb_define_module_function(mRglpk, "glp_term_hook", _wrap_glp_term_hook, -1);
- rb_define_module_function(mRglpk, "glp_open_tee", _wrap_glp_open_tee, -1);
- rb_define_module_function(mRglpk, "glp_close_tee", _wrap_glp_close_tee, -1);
- rb_define_module_function(mRglpk, "glp_error_", _wrap_glp_error_, -1);
- rb_define_module_function(mRglpk, "glp_assert_", _wrap_glp_assert_, -1);
- rb_define_module_function(mRglpk, "glp_error_hook", _wrap_glp_error_hook, -1);
- rb_define_module_function(mRglpk, "glp_malloc", _wrap_glp_malloc, -1);
- rb_define_module_function(mRglpk, "glp_calloc", _wrap_glp_calloc, -1);
- rb_define_module_function(mRglpk, "glp_free", _wrap_glp_free, -1);
- rb_define_module_function(mRglpk, "glp_mem_limit", _wrap_glp_mem_limit, -1);
- rb_define_module_function(mRglpk, "glp_mem_usage", _wrap_glp_mem_usage, -1);
- rb_define_module_function(mRglpk, "glp_time", _wrap_glp_time, -1);
- rb_define_module_function(mRglpk, "glp_difftime", _wrap_glp_difftime, -1);
-
- SwigClassGlp_data.klass = rb_define_class_under(mRglpk, "Glp_data", rb_cObject);
+ rb_define_module_function(mGlpk_wrapper, "glp_init_env", _wrap_glp_init_env, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_version", _wrap_glp_version, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_free_env", _wrap_glp_free_env, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_printf", _wrap_glp_printf, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_term_out", _wrap_glp_term_out, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_term_hook", _wrap_glp_term_hook, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_open_tee", _wrap_glp_open_tee, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_close_tee", _wrap_glp_close_tee, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_error_", _wrap_glp_error_, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_assert_", _wrap_glp_assert_, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_error_hook", _wrap_glp_error_hook, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_malloc", _wrap_glp_malloc, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_calloc", _wrap_glp_calloc, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_free", _wrap_glp_free, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mem_limit", _wrap_glp_mem_limit, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mem_usage", _wrap_glp_mem_usage, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_time", _wrap_glp_time, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_difftime", _wrap_glp_difftime, -1);
+
+ SwigClassGlp_data.klass = rb_define_class_under(mGlpk_wrapper, "Glp_data", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_glp_data, (void *) &SwigClassGlp_data);
rb_define_alloc_func(SwigClassGlp_data.klass, _wrap_glp_data_allocate);
rb_define_method(SwigClassGlp_data.klass, "initialize", _wrap_new_glp_data, -1);
@@ -21395,18 +21395,18 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassGlp_data.mark = 0;
SwigClassGlp_data.destroy = (void (*)(void *)) free_glp_data;
SwigClassGlp_data.trackObjects = 0;
- rb_define_module_function(mRglpk, "glp_sdf_open_file", _wrap_glp_sdf_open_file, -1);
- rb_define_module_function(mRglpk, "glp_sdf_set_jump", _wrap_glp_sdf_set_jump, -1);
- rb_define_module_function(mRglpk, "glp_sdf_error", _wrap_glp_sdf_error, -1);
- rb_define_module_function(mRglpk, "glp_sdf_warning", _wrap_glp_sdf_warning, -1);
- rb_define_module_function(mRglpk, "glp_sdf_read_int", _wrap_glp_sdf_read_int, -1);
- rb_define_module_function(mRglpk, "glp_sdf_read_num", _wrap_glp_sdf_read_num, -1);
- rb_define_module_function(mRglpk, "glp_sdf_read_item", _wrap_glp_sdf_read_item, -1);
- rb_define_module_function(mRglpk, "glp_sdf_read_text", _wrap_glp_sdf_read_text, -1);
- rb_define_module_function(mRglpk, "glp_sdf_line", _wrap_glp_sdf_line, -1);
- rb_define_module_function(mRglpk, "glp_sdf_close_file", _wrap_glp_sdf_close_file, -1);
-
- SwigClass_glp_graph.klass = rb_define_class_under(mRglpk, "_glp_graph", rb_cObject);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_open_file", _wrap_glp_sdf_open_file, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_set_jump", _wrap_glp_sdf_set_jump, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_error", _wrap_glp_sdf_error, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_warning", _wrap_glp_sdf_warning, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_read_int", _wrap_glp_sdf_read_int, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_read_num", _wrap_glp_sdf_read_num, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_read_item", _wrap_glp_sdf_read_item, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_read_text", _wrap_glp_sdf_read_text, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_line", _wrap_glp_sdf_line, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_sdf_close_file", _wrap_glp_sdf_close_file, -1);
+
+ SwigClass_glp_graph.klass = rb_define_class_under(mGlpk_wrapper, "_glp_graph", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p__glp_graph, (void *) &SwigClass_glp_graph);
rb_define_alloc_func(SwigClass_glp_graph.klass, _wrap__glp_graph_allocate);
rb_define_method(SwigClass_glp_graph.klass, "initialize", _wrap_new__glp_graph, -1);
@@ -21432,7 +21432,7 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClass_glp_graph.destroy = (void (*)(void *)) free__glp_graph;
SwigClass_glp_graph.trackObjects = 0;
- SwigClass_glp_vertex.klass = rb_define_class_under(mRglpk, "_glp_vertex", rb_cObject);
+ SwigClass_glp_vertex.klass = rb_define_class_under(mGlpk_wrapper, "_glp_vertex", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p__glp_vertex, (void *) &SwigClass_glp_vertex);
rb_define_alloc_func(SwigClass_glp_vertex.klass, _wrap__glp_vertex_allocate);
rb_define_method(SwigClass_glp_vertex.klass, "initialize", _wrap_new__glp_vertex, -1);
@@ -21454,7 +21454,7 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClass_glp_vertex.destroy = (void (*)(void *)) free__glp_vertex;
SwigClass_glp_vertex.trackObjects = 0;
- SwigClass_glp_arc.klass = rb_define_class_under(mRglpk, "_glp_arc", rb_cObject);
+ SwigClass_glp_arc.klass = rb_define_class_under(mGlpk_wrapper, "_glp_arc", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p__glp_arc, (void *) &SwigClass_glp_arc);
rb_define_alloc_func(SwigClass_glp_arc.klass, _wrap__glp_arc_allocate);
rb_define_method(SwigClass_glp_arc.klass, "initialize", _wrap_new__glp_arc, -1);
@@ -21477,138 +21477,138 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClass_glp_arc.mark = 0;
SwigClass_glp_arc.destroy = (void (*)(void *)) free__glp_arc;
SwigClass_glp_arc.trackObjects = 0;
- rb_define_module_function(mRglpk, "glp_create_graph", _wrap_glp_create_graph, -1);
- rb_define_module_function(mRglpk, "glp_set_graph_name", _wrap_glp_set_graph_name, -1);
- rb_define_module_function(mRglpk, "glp_add_vertices", _wrap_glp_add_vertices, -1);
- rb_define_module_function(mRglpk, "glp_set_vertex_name", _wrap_glp_set_vertex_name, -1);
- rb_define_module_function(mRglpk, "glp_add_arc", _wrap_glp_add_arc, -1);
- rb_define_module_function(mRglpk, "glp_del_vertices", _wrap_glp_del_vertices, -1);
- rb_define_module_function(mRglpk, "glp_del_arc", _wrap_glp_del_arc, -1);
- rb_define_module_function(mRglpk, "glp_erase_graph", _wrap_glp_erase_graph, -1);
- rb_define_module_function(mRglpk, "glp_delete_graph", _wrap_glp_delete_graph, -1);
- rb_define_module_function(mRglpk, "glp_create_v_index", _wrap_glp_create_v_index, -1);
- rb_define_module_function(mRglpk, "glp_find_vertex", _wrap_glp_find_vertex, -1);
- rb_define_module_function(mRglpk, "glp_delete_v_index", _wrap_glp_delete_v_index, -1);
- rb_define_module_function(mRglpk, "glp_read_graph", _wrap_glp_read_graph, -1);
- rb_define_module_function(mRglpk, "glp_write_graph", _wrap_glp_write_graph, -1);
- rb_define_module_function(mRglpk, "glp_mincost_lp", _wrap_glp_mincost_lp, -1);
- rb_define_module_function(mRglpk, "glp_mincost_okalg", _wrap_glp_mincost_okalg, -1);
- rb_define_module_function(mRglpk, "glp_maxflow_lp", _wrap_glp_maxflow_lp, -1);
- rb_define_module_function(mRglpk, "glp_maxflow_ffalg", _wrap_glp_maxflow_ffalg, -1);
- rb_define_module_function(mRglpk, "glp_check_asnprob", _wrap_glp_check_asnprob, -1);
- rb_define_const(mRglpk, "GLP_ASN_MIN", SWIG_From_int((int)(1)));
- rb_define_const(mRglpk, "GLP_ASN_MAX", SWIG_From_int((int)(2)));
- rb_define_const(mRglpk, "GLP_ASN_MMP", SWIG_From_int((int)(3)));
- rb_define_module_function(mRglpk, "glp_asnprob_lp", _wrap_glp_asnprob_lp, -1);
- rb_define_module_function(mRglpk, "glp_asnprob_okalg", _wrap_glp_asnprob_okalg, -1);
- rb_define_module_function(mRglpk, "glp_asnprob_hall", _wrap_glp_asnprob_hall, -1);
- rb_define_module_function(mRglpk, "glp_cpp", _wrap_glp_cpp, -1);
- rb_define_module_function(mRglpk, "glp_read_mincost", _wrap_glp_read_mincost, -1);
- rb_define_module_function(mRglpk, "glp_write_mincost", _wrap_glp_write_mincost, -1);
- rb_define_module_function(mRglpk, "glp_read_maxflow", _wrap_glp_read_maxflow, -1);
- rb_define_module_function(mRglpk, "glp_write_maxflow", _wrap_glp_write_maxflow, -1);
- rb_define_module_function(mRglpk, "glp_read_asnprob", _wrap_glp_read_asnprob, -1);
- rb_define_module_function(mRglpk, "glp_write_asnprob", _wrap_glp_write_asnprob, -1);
- rb_define_module_function(mRglpk, "glp_read_ccdata", _wrap_glp_read_ccdata, -1);
- rb_define_module_function(mRglpk, "glp_write_ccdata", _wrap_glp_write_ccdata, -1);
- rb_define_module_function(mRglpk, "glp_netgen", _wrap_glp_netgen, -1);
- rb_define_module_function(mRglpk, "glp_gridgen", _wrap_glp_gridgen, -1);
- rb_define_module_function(mRglpk, "glp_rmfgen", _wrap_glp_rmfgen, -1);
- rb_define_module_function(mRglpk, "glp_weak_comp", _wrap_glp_weak_comp, -1);
- rb_define_module_function(mRglpk, "glp_strong_comp", _wrap_glp_strong_comp, -1);
- rb_define_module_function(mRglpk, "glp_top_sort", _wrap_glp_top_sort, -1);
- rb_define_module_function(mRglpk, "glp_wclique_exact", _wrap_glp_wclique_exact, -1);
- rb_define_const(mRglpk, "LPX_LP", SWIG_From_int((int)(100)));
- rb_define_const(mRglpk, "LPX_MIP", SWIG_From_int((int)(101)));
- rb_define_const(mRglpk, "LPX_FR", SWIG_From_int((int)(110)));
- rb_define_const(mRglpk, "LPX_LO", SWIG_From_int((int)(111)));
- rb_define_const(mRglpk, "LPX_UP", SWIG_From_int((int)(112)));
- rb_define_const(mRglpk, "LPX_DB", SWIG_From_int((int)(113)));
- rb_define_const(mRglpk, "LPX_FX", SWIG_From_int((int)(114)));
- rb_define_const(mRglpk, "LPX_MIN", SWIG_From_int((int)(120)));
- rb_define_const(mRglpk, "LPX_MAX", SWIG_From_int((int)(121)));
- rb_define_const(mRglpk, "LPX_P_UNDEF", SWIG_From_int((int)(132)));
- rb_define_const(mRglpk, "LPX_P_FEAS", SWIG_From_int((int)(133)));
- rb_define_const(mRglpk, "LPX_P_INFEAS", SWIG_From_int((int)(134)));
- rb_define_const(mRglpk, "LPX_P_NOFEAS", SWIG_From_int((int)(135)));
- rb_define_const(mRglpk, "LPX_D_UNDEF", SWIG_From_int((int)(136)));
- rb_define_const(mRglpk, "LPX_D_FEAS", SWIG_From_int((int)(137)));
- rb_define_const(mRglpk, "LPX_D_INFEAS", SWIG_From_int((int)(138)));
- rb_define_const(mRglpk, "LPX_D_NOFEAS", SWIG_From_int((int)(139)));
- rb_define_const(mRglpk, "LPX_BS", SWIG_From_int((int)(140)));
- rb_define_const(mRglpk, "LPX_NL", SWIG_From_int((int)(141)));
- rb_define_const(mRglpk, "LPX_NU", SWIG_From_int((int)(142)));
- rb_define_const(mRglpk, "LPX_NF", SWIG_From_int((int)(143)));
- rb_define_const(mRglpk, "LPX_NS", SWIG_From_int((int)(144)));
- rb_define_const(mRglpk, "LPX_T_UNDEF", SWIG_From_int((int)(150)));
- rb_define_const(mRglpk, "LPX_T_OPT", SWIG_From_int((int)(151)));
- rb_define_const(mRglpk, "LPX_CV", SWIG_From_int((int)(160)));
- rb_define_const(mRglpk, "LPX_IV", SWIG_From_int((int)(161)));
- rb_define_const(mRglpk, "LPX_I_UNDEF", SWIG_From_int((int)(170)));
- rb_define_const(mRglpk, "LPX_I_OPT", SWIG_From_int((int)(171)));
- rb_define_const(mRglpk, "LPX_I_FEAS", SWIG_From_int((int)(172)));
- rb_define_const(mRglpk, "LPX_I_NOFEAS", SWIG_From_int((int)(173)));
- rb_define_const(mRglpk, "LPX_OPT", SWIG_From_int((int)(180)));
- rb_define_const(mRglpk, "LPX_FEAS", SWIG_From_int((int)(181)));
- rb_define_const(mRglpk, "LPX_INFEAS", SWIG_From_int((int)(182)));
- rb_define_const(mRglpk, "LPX_NOFEAS", SWIG_From_int((int)(183)));
- rb_define_const(mRglpk, "LPX_UNBND", SWIG_From_int((int)(184)));
- rb_define_const(mRglpk, "LPX_UNDEF", SWIG_From_int((int)(185)));
- rb_define_const(mRglpk, "LPX_E_OK", SWIG_From_int((int)(200)));
- rb_define_const(mRglpk, "LPX_E_EMPTY", SWIG_From_int((int)(201)));
- rb_define_const(mRglpk, "LPX_E_BADB", SWIG_From_int((int)(202)));
- rb_define_const(mRglpk, "LPX_E_INFEAS", SWIG_From_int((int)(203)));
- rb_define_const(mRglpk, "LPX_E_FAULT", SWIG_From_int((int)(204)));
- rb_define_const(mRglpk, "LPX_E_OBJLL", SWIG_From_int((int)(205)));
- rb_define_const(mRglpk, "LPX_E_OBJUL", SWIG_From_int((int)(206)));
- rb_define_const(mRglpk, "LPX_E_ITLIM", SWIG_From_int((int)(207)));
- rb_define_const(mRglpk, "LPX_E_TMLIM", SWIG_From_int((int)(208)));
- rb_define_const(mRglpk, "LPX_E_NOFEAS", SWIG_From_int((int)(209)));
- rb_define_const(mRglpk, "LPX_E_INSTAB", SWIG_From_int((int)(210)));
- rb_define_const(mRglpk, "LPX_E_SING", SWIG_From_int((int)(211)));
- rb_define_const(mRglpk, "LPX_E_NOCONV", SWIG_From_int((int)(212)));
- rb_define_const(mRglpk, "LPX_E_NOPFS", SWIG_From_int((int)(213)));
- rb_define_const(mRglpk, "LPX_E_NODFS", SWIG_From_int((int)(214)));
- rb_define_const(mRglpk, "LPX_E_MIPGAP", SWIG_From_int((int)(215)));
- rb_define_const(mRglpk, "LPX_K_MSGLEV", SWIG_From_int((int)(300)));
- rb_define_const(mRglpk, "LPX_K_SCALE", SWIG_From_int((int)(301)));
- rb_define_const(mRglpk, "LPX_K_DUAL", SWIG_From_int((int)(302)));
- rb_define_const(mRglpk, "LPX_K_PRICE", SWIG_From_int((int)(303)));
- rb_define_const(mRglpk, "LPX_K_RELAX", SWIG_From_int((int)(304)));
- rb_define_const(mRglpk, "LPX_K_TOLBND", SWIG_From_int((int)(305)));
- rb_define_const(mRglpk, "LPX_K_TOLDJ", SWIG_From_int((int)(306)));
- rb_define_const(mRglpk, "LPX_K_TOLPIV", SWIG_From_int((int)(307)));
- rb_define_const(mRglpk, "LPX_K_ROUND", SWIG_From_int((int)(308)));
- rb_define_const(mRglpk, "LPX_K_OBJLL", SWIG_From_int((int)(309)));
- rb_define_const(mRglpk, "LPX_K_OBJUL", SWIG_From_int((int)(310)));
- rb_define_const(mRglpk, "LPX_K_ITLIM", SWIG_From_int((int)(311)));
- rb_define_const(mRglpk, "LPX_K_ITCNT", SWIG_From_int((int)(312)));
- rb_define_const(mRglpk, "LPX_K_TMLIM", SWIG_From_int((int)(313)));
- rb_define_const(mRglpk, "LPX_K_OUTFRQ", SWIG_From_int((int)(314)));
- rb_define_const(mRglpk, "LPX_K_OUTDLY", SWIG_From_int((int)(315)));
- rb_define_const(mRglpk, "LPX_K_BRANCH", SWIG_From_int((int)(316)));
- rb_define_const(mRglpk, "LPX_K_BTRACK", SWIG_From_int((int)(317)));
- rb_define_const(mRglpk, "LPX_K_TOLINT", SWIG_From_int((int)(318)));
- rb_define_const(mRglpk, "LPX_K_TOLOBJ", SWIG_From_int((int)(319)));
- rb_define_const(mRglpk, "LPX_K_MPSINFO", SWIG_From_int((int)(320)));
- rb_define_const(mRglpk, "LPX_K_MPSOBJ", SWIG_From_int((int)(321)));
- rb_define_const(mRglpk, "LPX_K_MPSORIG", SWIG_From_int((int)(322)));
- rb_define_const(mRglpk, "LPX_K_MPSWIDE", SWIG_From_int((int)(323)));
- rb_define_const(mRglpk, "LPX_K_MPSFREE", SWIG_From_int((int)(324)));
- rb_define_const(mRglpk, "LPX_K_MPSSKIP", SWIG_From_int((int)(325)));
- rb_define_const(mRglpk, "LPX_K_LPTORIG", SWIG_From_int((int)(326)));
- rb_define_const(mRglpk, "LPX_K_PRESOL", SWIG_From_int((int)(327)));
- rb_define_const(mRglpk, "LPX_K_BINARIZE", SWIG_From_int((int)(328)));
- rb_define_const(mRglpk, "LPX_K_USECUTS", SWIG_From_int((int)(329)));
- rb_define_const(mRglpk, "LPX_K_BFTYPE", SWIG_From_int((int)(330)));
- rb_define_const(mRglpk, "LPX_K_MIPGAP", SWIG_From_int((int)(331)));
- rb_define_const(mRglpk, "LPX_C_COVER", SWIG_From_int((int)(0x01)));
- rb_define_const(mRglpk, "LPX_C_CLIQUE", SWIG_From_int((int)(0x02)));
- rb_define_const(mRglpk, "LPX_C_GOMORY", SWIG_From_int((int)(0x04)));
- rb_define_const(mRglpk, "LPX_C_MIR", SWIG_From_int((int)(0x08)));
- rb_define_const(mRglpk, "LPX_C_ALL", SWIG_From_int((int)(0xFF)));
-
- SwigClassLPXKKT.klass = rb_define_class_under(mRglpk, "LPXKKT", rb_cObject);
+ rb_define_module_function(mGlpk_wrapper, "glp_create_graph", _wrap_glp_create_graph, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_graph_name", _wrap_glp_set_graph_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_add_vertices", _wrap_glp_add_vertices, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_set_vertex_name", _wrap_glp_set_vertex_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_add_arc", _wrap_glp_add_arc, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_del_vertices", _wrap_glp_del_vertices, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_del_arc", _wrap_glp_del_arc, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_erase_graph", _wrap_glp_erase_graph, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_delete_graph", _wrap_glp_delete_graph, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_create_v_index", _wrap_glp_create_v_index, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_find_vertex", _wrap_glp_find_vertex, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_delete_v_index", _wrap_glp_delete_v_index, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_graph", _wrap_glp_read_graph, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_graph", _wrap_glp_write_graph, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mincost_lp", _wrap_glp_mincost_lp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_mincost_okalg", _wrap_glp_mincost_okalg, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_maxflow_lp", _wrap_glp_maxflow_lp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_maxflow_ffalg", _wrap_glp_maxflow_ffalg, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_check_asnprob", _wrap_glp_check_asnprob, -1);
+ rb_define_const(mGlpk_wrapper, "GLP_ASN_MIN", SWIG_From_int((int)(1)));
+ rb_define_const(mGlpk_wrapper, "GLP_ASN_MAX", SWIG_From_int((int)(2)));
+ rb_define_const(mGlpk_wrapper, "GLP_ASN_MMP", SWIG_From_int((int)(3)));
+ rb_define_module_function(mGlpk_wrapper, "glp_asnprob_lp", _wrap_glp_asnprob_lp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_asnprob_okalg", _wrap_glp_asnprob_okalg, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_asnprob_hall", _wrap_glp_asnprob_hall, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_cpp", _wrap_glp_cpp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_mincost", _wrap_glp_read_mincost, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_mincost", _wrap_glp_write_mincost, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_maxflow", _wrap_glp_read_maxflow, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_maxflow", _wrap_glp_write_maxflow, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_asnprob", _wrap_glp_read_asnprob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_asnprob", _wrap_glp_write_asnprob, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_read_ccdata", _wrap_glp_read_ccdata, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_write_ccdata", _wrap_glp_write_ccdata, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_netgen", _wrap_glp_netgen, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_gridgen", _wrap_glp_gridgen, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_rmfgen", _wrap_glp_rmfgen, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_weak_comp", _wrap_glp_weak_comp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_strong_comp", _wrap_glp_strong_comp, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_top_sort", _wrap_glp_top_sort, -1);
+ rb_define_module_function(mGlpk_wrapper, "glp_wclique_exact", _wrap_glp_wclique_exact, -1);
+ rb_define_const(mGlpk_wrapper, "LPX_LP", SWIG_From_int((int)(100)));
+ rb_define_const(mGlpk_wrapper, "LPX_MIP", SWIG_From_int((int)(101)));
+ rb_define_const(mGlpk_wrapper, "LPX_FR", SWIG_From_int((int)(110)));
+ rb_define_const(mGlpk_wrapper, "LPX_LO", SWIG_From_int((int)(111)));
+ rb_define_const(mGlpk_wrapper, "LPX_UP", SWIG_From_int((int)(112)));
+ rb_define_const(mGlpk_wrapper, "LPX_DB", SWIG_From_int((int)(113)));
+ rb_define_const(mGlpk_wrapper, "LPX_FX", SWIG_From_int((int)(114)));
+ rb_define_const(mGlpk_wrapper, "LPX_MIN", SWIG_From_int((int)(120)));
+ rb_define_const(mGlpk_wrapper, "LPX_MAX", SWIG_From_int((int)(121)));
+ rb_define_const(mGlpk_wrapper, "LPX_P_UNDEF", SWIG_From_int((int)(132)));
+ rb_define_const(mGlpk_wrapper, "LPX_P_FEAS", SWIG_From_int((int)(133)));
+ rb_define_const(mGlpk_wrapper, "LPX_P_INFEAS", SWIG_From_int((int)(134)));
+ rb_define_const(mGlpk_wrapper, "LPX_P_NOFEAS", SWIG_From_int((int)(135)));
+ rb_define_const(mGlpk_wrapper, "LPX_D_UNDEF", SWIG_From_int((int)(136)));
+ rb_define_const(mGlpk_wrapper, "LPX_D_FEAS", SWIG_From_int((int)(137)));
+ rb_define_const(mGlpk_wrapper, "LPX_D_INFEAS", SWIG_From_int((int)(138)));
+ rb_define_const(mGlpk_wrapper, "LPX_D_NOFEAS", SWIG_From_int((int)(139)));
+ rb_define_const(mGlpk_wrapper, "LPX_BS", SWIG_From_int((int)(140)));
+ rb_define_const(mGlpk_wrapper, "LPX_NL", SWIG_From_int((int)(141)));
+ rb_define_const(mGlpk_wrapper, "LPX_NU", SWIG_From_int((int)(142)));
+ rb_define_const(mGlpk_wrapper, "LPX_NF", SWIG_From_int((int)(143)));
+ rb_define_const(mGlpk_wrapper, "LPX_NS", SWIG_From_int((int)(144)));
+ rb_define_const(mGlpk_wrapper, "LPX_T_UNDEF", SWIG_From_int((int)(150)));
+ rb_define_const(mGlpk_wrapper, "LPX_T_OPT", SWIG_From_int((int)(151)));
+ rb_define_const(mGlpk_wrapper, "LPX_CV", SWIG_From_int((int)(160)));
+ rb_define_const(mGlpk_wrapper, "LPX_IV", SWIG_From_int((int)(161)));
+ rb_define_const(mGlpk_wrapper, "LPX_I_UNDEF", SWIG_From_int((int)(170)));
+ rb_define_const(mGlpk_wrapper, "LPX_I_OPT", SWIG_From_int((int)(171)));
+ rb_define_const(mGlpk_wrapper, "LPX_I_FEAS", SWIG_From_int((int)(172)));
+ rb_define_const(mGlpk_wrapper, "LPX_I_NOFEAS", SWIG_From_int((int)(173)));
+ rb_define_const(mGlpk_wrapper, "LPX_OPT", SWIG_From_int((int)(180)));
+ rb_define_const(mGlpk_wrapper, "LPX_FEAS", SWIG_From_int((int)(181)));
+ rb_define_const(mGlpk_wrapper, "LPX_INFEAS", SWIG_From_int((int)(182)));
+ rb_define_const(mGlpk_wrapper, "LPX_NOFEAS", SWIG_From_int((int)(183)));
+ rb_define_const(mGlpk_wrapper, "LPX_UNBND", SWIG_From_int((int)(184)));
+ rb_define_const(mGlpk_wrapper, "LPX_UNDEF", SWIG_From_int((int)(185)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_OK", SWIG_From_int((int)(200)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_EMPTY", SWIG_From_int((int)(201)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_BADB", SWIG_From_int((int)(202)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_INFEAS", SWIG_From_int((int)(203)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_FAULT", SWIG_From_int((int)(204)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_OBJLL", SWIG_From_int((int)(205)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_OBJUL", SWIG_From_int((int)(206)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_ITLIM", SWIG_From_int((int)(207)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_TMLIM", SWIG_From_int((int)(208)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_NOFEAS", SWIG_From_int((int)(209)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_INSTAB", SWIG_From_int((int)(210)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_SING", SWIG_From_int((int)(211)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_NOCONV", SWIG_From_int((int)(212)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_NOPFS", SWIG_From_int((int)(213)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_NODFS", SWIG_From_int((int)(214)));
+ rb_define_const(mGlpk_wrapper, "LPX_E_MIPGAP", SWIG_From_int((int)(215)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MSGLEV", SWIG_From_int((int)(300)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_SCALE", SWIG_From_int((int)(301)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_DUAL", SWIG_From_int((int)(302)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_PRICE", SWIG_From_int((int)(303)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_RELAX", SWIG_From_int((int)(304)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_TOLBND", SWIG_From_int((int)(305)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_TOLDJ", SWIG_From_int((int)(306)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_TOLPIV", SWIG_From_int((int)(307)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_ROUND", SWIG_From_int((int)(308)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_OBJLL", SWIG_From_int((int)(309)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_OBJUL", SWIG_From_int((int)(310)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_ITLIM", SWIG_From_int((int)(311)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_ITCNT", SWIG_From_int((int)(312)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_TMLIM", SWIG_From_int((int)(313)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_OUTFRQ", SWIG_From_int((int)(314)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_OUTDLY", SWIG_From_int((int)(315)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_BRANCH", SWIG_From_int((int)(316)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_BTRACK", SWIG_From_int((int)(317)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_TOLINT", SWIG_From_int((int)(318)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_TOLOBJ", SWIG_From_int((int)(319)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MPSINFO", SWIG_From_int((int)(320)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MPSOBJ", SWIG_From_int((int)(321)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MPSORIG", SWIG_From_int((int)(322)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MPSWIDE", SWIG_From_int((int)(323)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MPSFREE", SWIG_From_int((int)(324)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MPSSKIP", SWIG_From_int((int)(325)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_LPTORIG", SWIG_From_int((int)(326)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_PRESOL", SWIG_From_int((int)(327)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_BINARIZE", SWIG_From_int((int)(328)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_USECUTS", SWIG_From_int((int)(329)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_BFTYPE", SWIG_From_int((int)(330)));
+ rb_define_const(mGlpk_wrapper, "LPX_K_MIPGAP", SWIG_From_int((int)(331)));
+ rb_define_const(mGlpk_wrapper, "LPX_C_COVER", SWIG_From_int((int)(0x01)));
+ rb_define_const(mGlpk_wrapper, "LPX_C_CLIQUE", SWIG_From_int((int)(0x02)));
+ rb_define_const(mGlpk_wrapper, "LPX_C_GOMORY", SWIG_From_int((int)(0x04)));
+ rb_define_const(mGlpk_wrapper, "LPX_C_MIR", SWIG_From_int((int)(0x08)));
+ rb_define_const(mGlpk_wrapper, "LPX_C_ALL", SWIG_From_int((int)(0xFF)));
+
+ SwigClassLPXKKT.klass = rb_define_class_under(mGlpk_wrapper, "LPXKKT", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_LPXKKT, (void *) &SwigClassLPXKKT);
rb_define_alloc_func(SwigClassLPXKKT.klass, _wrap_LPXKKT_allocate);
rb_define_method(SwigClassLPXKKT.klass, "initialize", _wrap_new_LPXKKT, -1);
@@ -21665,117 +21665,117 @@ SWIGEXPORT void Init_rglpk(void) {
SwigClassLPXKKT.mark = 0;
SwigClassLPXKKT.destroy = (void (*)(void *)) free_LPXKKT;
SwigClassLPXKKT.trackObjects = 0;
- rb_define_module_function(mRglpk, "_glp_lpx_create_prob", _wrap__glp_lpx_create_prob, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_prob_name", _wrap__glp_lpx_set_prob_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_obj_name", _wrap__glp_lpx_set_obj_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_obj_dir", _wrap__glp_lpx_set_obj_dir, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_add_rows", _wrap__glp_lpx_add_rows, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_add_cols", _wrap__glp_lpx_add_cols, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_row_name", _wrap__glp_lpx_set_row_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_col_name", _wrap__glp_lpx_set_col_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_row_bnds", _wrap__glp_lpx_set_row_bnds, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_col_bnds", _wrap__glp_lpx_set_col_bnds, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_obj_coef", _wrap__glp_lpx_set_obj_coef, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_mat_row", _wrap__glp_lpx_set_mat_row, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_mat_col", _wrap__glp_lpx_set_mat_col, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_load_matrix", _wrap__glp_lpx_load_matrix, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_del_rows", _wrap__glp_lpx_del_rows, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_del_cols", _wrap__glp_lpx_del_cols, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_delete_prob", _wrap__glp_lpx_delete_prob, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_prob_name", _wrap__glp_lpx_get_prob_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_obj_name", _wrap__glp_lpx_get_obj_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_obj_dir", _wrap__glp_lpx_get_obj_dir, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_num_rows", _wrap__glp_lpx_get_num_rows, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_num_cols", _wrap__glp_lpx_get_num_cols, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_name", _wrap__glp_lpx_get_row_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_name", _wrap__glp_lpx_get_col_name, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_type", _wrap__glp_lpx_get_row_type, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_lb", _wrap__glp_lpx_get_row_lb, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_ub", _wrap__glp_lpx_get_row_ub, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_bnds", _wrap__glp_lpx_get_row_bnds, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_type", _wrap__glp_lpx_get_col_type, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_lb", _wrap__glp_lpx_get_col_lb, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_ub", _wrap__glp_lpx_get_col_ub, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_bnds", _wrap__glp_lpx_get_col_bnds, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_obj_coef", _wrap__glp_lpx_get_obj_coef, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_num_nz", _wrap__glp_lpx_get_num_nz, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_mat_row", _wrap__glp_lpx_get_mat_row, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_mat_col", _wrap__glp_lpx_get_mat_col, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_create_index", _wrap__glp_lpx_create_index, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_find_row", _wrap__glp_lpx_find_row, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_find_col", _wrap__glp_lpx_find_col, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_delete_index", _wrap__glp_lpx_delete_index, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_scale_prob", _wrap__glp_lpx_scale_prob, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_unscale_prob", _wrap__glp_lpx_unscale_prob, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_row_stat", _wrap__glp_lpx_set_row_stat, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_col_stat", _wrap__glp_lpx_set_col_stat, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_std_basis", _wrap__glp_lpx_std_basis, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_adv_basis", _wrap__glp_lpx_adv_basis, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_cpx_basis", _wrap__glp_lpx_cpx_basis, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_simplex", _wrap__glp_lpx_simplex, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_exact", _wrap__glp_lpx_exact, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_status", _wrap__glp_lpx_get_status, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_prim_stat", _wrap__glp_lpx_get_prim_stat, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_dual_stat", _wrap__glp_lpx_get_dual_stat, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_obj_val", _wrap__glp_lpx_get_obj_val, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_stat", _wrap__glp_lpx_get_row_stat, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_prim", _wrap__glp_lpx_get_row_prim, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_dual", _wrap__glp_lpx_get_row_dual, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_row_info", _wrap__glp_lpx_get_row_info, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_stat", _wrap__glp_lpx_get_col_stat, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_prim", _wrap__glp_lpx_get_col_prim, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_dual", _wrap__glp_lpx_get_col_dual, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_info", _wrap__glp_lpx_get_col_info, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_ray_info", _wrap__glp_lpx_get_ray_info, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_check_kkt", _wrap__glp_lpx_check_kkt, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_warm_up", _wrap__glp_lpx_warm_up, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_eval_tab_row", _wrap__glp_lpx_eval_tab_row, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_eval_tab_col", _wrap__glp_lpx_eval_tab_col, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_transform_row", _wrap__glp_lpx_transform_row, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_transform_col", _wrap__glp_lpx_transform_col, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_prim_ratio_test", _wrap__glp_lpx_prim_ratio_test, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_dual_ratio_test", _wrap__glp_lpx_dual_ratio_test, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_interior", _wrap__glp_lpx_interior, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_ipt_status", _wrap__glp_lpx_ipt_status, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_ipt_obj_val", _wrap__glp_lpx_ipt_obj_val, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_ipt_row_prim", _wrap__glp_lpx_ipt_row_prim, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_ipt_row_dual", _wrap__glp_lpx_ipt_row_dual, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_ipt_col_prim", _wrap__glp_lpx_ipt_col_prim, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_ipt_col_dual", _wrap__glp_lpx_ipt_col_dual, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_class", _wrap__glp_lpx_set_class, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_class", _wrap__glp_lpx_get_class, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_col_kind", _wrap__glp_lpx_set_col_kind, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_col_kind", _wrap__glp_lpx_get_col_kind, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_num_int", _wrap__glp_lpx_get_num_int, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_num_bin", _wrap__glp_lpx_get_num_bin, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_integer", _wrap__glp_lpx_integer, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_intopt", _wrap__glp_lpx_intopt, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_mip_status", _wrap__glp_lpx_mip_status, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_mip_obj_val", _wrap__glp_lpx_mip_obj_val, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_mip_row_val", _wrap__glp_lpx_mip_row_val, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_mip_col_val", _wrap__glp_lpx_mip_col_val, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_check_int", _wrap__glp_lpx_check_int, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_reset_parms", _wrap__glp_lpx_reset_parms, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_int_parm", _wrap__glp_lpx_set_int_parm, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_int_parm", _wrap__glp_lpx_get_int_parm, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_set_real_parm", _wrap__glp_lpx_set_real_parm, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_get_real_parm", _wrap__glp_lpx_get_real_parm, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_read_mps", _wrap__glp_lpx_read_mps, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_write_mps", _wrap__glp_lpx_write_mps, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_read_bas", _wrap__glp_lpx_read_bas, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_write_bas", _wrap__glp_lpx_write_bas, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_read_freemps", _wrap__glp_lpx_read_freemps, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_write_freemps", _wrap__glp_lpx_write_freemps, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_read_cpxlp", _wrap__glp_lpx_read_cpxlp, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_write_cpxlp", _wrap__glp_lpx_write_cpxlp, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_read_model", _wrap__glp_lpx_read_model, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_print_prob", _wrap__glp_lpx_print_prob, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_print_sol", _wrap__glp_lpx_print_sol, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_print_sens_bnds", _wrap__glp_lpx_print_sens_bnds, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_print_ips", _wrap__glp_lpx_print_ips, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_print_mip", _wrap__glp_lpx_print_mip, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_is_b_avail", _wrap__glp_lpx_is_b_avail, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_write_pb", _wrap__glp_lpx_write_pb, -1);
- rb_define_module_function(mRglpk, "_glp_lpx_main", _wrap__glp_lpx_main, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_create_prob", _wrap__glp_lpx_create_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_prob_name", _wrap__glp_lpx_set_prob_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_obj_name", _wrap__glp_lpx_set_obj_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_obj_dir", _wrap__glp_lpx_set_obj_dir, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_add_rows", _wrap__glp_lpx_add_rows, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_add_cols", _wrap__glp_lpx_add_cols, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_row_name", _wrap__glp_lpx_set_row_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_col_name", _wrap__glp_lpx_set_col_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_row_bnds", _wrap__glp_lpx_set_row_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_col_bnds", _wrap__glp_lpx_set_col_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_obj_coef", _wrap__glp_lpx_set_obj_coef, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_mat_row", _wrap__glp_lpx_set_mat_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_mat_col", _wrap__glp_lpx_set_mat_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_load_matrix", _wrap__glp_lpx_load_matrix, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_del_rows", _wrap__glp_lpx_del_rows, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_del_cols", _wrap__glp_lpx_del_cols, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_delete_prob", _wrap__glp_lpx_delete_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_prob_name", _wrap__glp_lpx_get_prob_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_obj_name", _wrap__glp_lpx_get_obj_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_obj_dir", _wrap__glp_lpx_get_obj_dir, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_num_rows", _wrap__glp_lpx_get_num_rows, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_num_cols", _wrap__glp_lpx_get_num_cols, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_name", _wrap__glp_lpx_get_row_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_name", _wrap__glp_lpx_get_col_name, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_type", _wrap__glp_lpx_get_row_type, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_lb", _wrap__glp_lpx_get_row_lb, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_ub", _wrap__glp_lpx_get_row_ub, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_bnds", _wrap__glp_lpx_get_row_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_type", _wrap__glp_lpx_get_col_type, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_lb", _wrap__glp_lpx_get_col_lb, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_ub", _wrap__glp_lpx_get_col_ub, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_bnds", _wrap__glp_lpx_get_col_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_obj_coef", _wrap__glp_lpx_get_obj_coef, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_num_nz", _wrap__glp_lpx_get_num_nz, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_mat_row", _wrap__glp_lpx_get_mat_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_mat_col", _wrap__glp_lpx_get_mat_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_create_index", _wrap__glp_lpx_create_index, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_find_row", _wrap__glp_lpx_find_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_find_col", _wrap__glp_lpx_find_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_delete_index", _wrap__glp_lpx_delete_index, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_scale_prob", _wrap__glp_lpx_scale_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_unscale_prob", _wrap__glp_lpx_unscale_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_row_stat", _wrap__glp_lpx_set_row_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_col_stat", _wrap__glp_lpx_set_col_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_std_basis", _wrap__glp_lpx_std_basis, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_adv_basis", _wrap__glp_lpx_adv_basis, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_cpx_basis", _wrap__glp_lpx_cpx_basis, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_simplex", _wrap__glp_lpx_simplex, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_exact", _wrap__glp_lpx_exact, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_status", _wrap__glp_lpx_get_status, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_prim_stat", _wrap__glp_lpx_get_prim_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_dual_stat", _wrap__glp_lpx_get_dual_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_obj_val", _wrap__glp_lpx_get_obj_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_stat", _wrap__glp_lpx_get_row_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_prim", _wrap__glp_lpx_get_row_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_dual", _wrap__glp_lpx_get_row_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_row_info", _wrap__glp_lpx_get_row_info, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_stat", _wrap__glp_lpx_get_col_stat, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_prim", _wrap__glp_lpx_get_col_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_dual", _wrap__glp_lpx_get_col_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_info", _wrap__glp_lpx_get_col_info, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_ray_info", _wrap__glp_lpx_get_ray_info, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_check_kkt", _wrap__glp_lpx_check_kkt, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_warm_up", _wrap__glp_lpx_warm_up, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_eval_tab_row", _wrap__glp_lpx_eval_tab_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_eval_tab_col", _wrap__glp_lpx_eval_tab_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_transform_row", _wrap__glp_lpx_transform_row, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_transform_col", _wrap__glp_lpx_transform_col, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_prim_ratio_test", _wrap__glp_lpx_prim_ratio_test, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_dual_ratio_test", _wrap__glp_lpx_dual_ratio_test, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_interior", _wrap__glp_lpx_interior, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_ipt_status", _wrap__glp_lpx_ipt_status, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_ipt_obj_val", _wrap__glp_lpx_ipt_obj_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_ipt_row_prim", _wrap__glp_lpx_ipt_row_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_ipt_row_dual", _wrap__glp_lpx_ipt_row_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_ipt_col_prim", _wrap__glp_lpx_ipt_col_prim, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_ipt_col_dual", _wrap__glp_lpx_ipt_col_dual, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_class", _wrap__glp_lpx_set_class, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_class", _wrap__glp_lpx_get_class, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_col_kind", _wrap__glp_lpx_set_col_kind, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_col_kind", _wrap__glp_lpx_get_col_kind, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_num_int", _wrap__glp_lpx_get_num_int, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_num_bin", _wrap__glp_lpx_get_num_bin, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_integer", _wrap__glp_lpx_integer, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_intopt", _wrap__glp_lpx_intopt, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_mip_status", _wrap__glp_lpx_mip_status, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_mip_obj_val", _wrap__glp_lpx_mip_obj_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_mip_row_val", _wrap__glp_lpx_mip_row_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_mip_col_val", _wrap__glp_lpx_mip_col_val, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_check_int", _wrap__glp_lpx_check_int, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_reset_parms", _wrap__glp_lpx_reset_parms, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_int_parm", _wrap__glp_lpx_set_int_parm, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_int_parm", _wrap__glp_lpx_get_int_parm, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_set_real_parm", _wrap__glp_lpx_set_real_parm, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_get_real_parm", _wrap__glp_lpx_get_real_parm, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_read_mps", _wrap__glp_lpx_read_mps, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_write_mps", _wrap__glp_lpx_write_mps, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_read_bas", _wrap__glp_lpx_read_bas, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_write_bas", _wrap__glp_lpx_write_bas, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_read_freemps", _wrap__glp_lpx_read_freemps, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_write_freemps", _wrap__glp_lpx_write_freemps, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_read_cpxlp", _wrap__glp_lpx_read_cpxlp, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_write_cpxlp", _wrap__glp_lpx_write_cpxlp, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_read_model", _wrap__glp_lpx_read_model, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_print_prob", _wrap__glp_lpx_print_prob, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_print_sol", _wrap__glp_lpx_print_sol, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_print_sens_bnds", _wrap__glp_lpx_print_sens_bnds, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_print_ips", _wrap__glp_lpx_print_ips, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_print_mip", _wrap__glp_lpx_print_mip, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_is_b_avail", _wrap__glp_lpx_is_b_avail, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_write_pb", _wrap__glp_lpx_write_pb, -1);
+ rb_define_module_function(mGlpk_wrapper, "_glp_lpx_main", _wrap__glp_lpx_main, -1);
}
View
142 lib/glpk.rb
@@ -1,9 +1,9 @@
-require 'rglpk.so'
+require 'glpk_wrapper'
module GLPK
- Rglpk.constants.each do |c|
- v = Rglpk.const_get(c)
+ Glpk_wrapper.constants.each do |c|
+ v = Glpk_wrapper.const_get(c)
self.const_set(c,v) if v.kind_of? Numeric
end
TypeConstants =[GLP_FR, GLP_LO, GLP_UP, GLP_DB, GLP_FX]
@@ -31,7 +31,7 @@ def [](i)
super(i)
elsif i.kind_of?(String)
raise RuntimeError if self[1].nil?
- idx = Rglpk.glp_find_row(self[1].p.lp,i)
+ idx = Glpk_wrapper.glp_find_row(self[1].p.lp,i)
raise ArgumentError if idx == 0
super(idx)
else
@@ -49,7 +49,7 @@ def [](i)
super(i)
elsif i.kind_of?(String)
raise RuntimeError if self[1].nil?
- idx = Rglpk.glp_find_col(self[1].p.lp,i)
+ idx = Glpk_wrapper.glp_find_col(self[1].p.lp,i)
raise ArgumentError if idx == 0
super(idx)
else
@@ -67,33 +67,33 @@ class Problem
attr_accessor :rows, :cols, :obj, :lp
def initialize
- @lp = Rglpk.glp_create_prob
+ @lp = Glpk_wrapper.glp_create_prob
@obj = GLPK::ObjectiveFunction.new(self)
@rows = GLPK::RowArray.new
@cols = GLPK::ColArray.new
- Rglpk.glp_create_index(@lp)
+ Glpk_wrapper.glp_create_index(@lp)
@status = nil
end
def name=(n)
- Rglpk.glp_set_prob_name(@lp,n)
+ Glpk_wrapper.glp_set_prob_name(@lp,n)
end
def name
- Rglpk.glp_get_prob_name(@lp)
+ Glpk_wrapper.glp_get_prob_name(@lp)
end
def nz
- Rglpk.glp_get_num_nz(@lp)
+ Glpk_wrapper.glp_get_num_nz(@lp)
end
def add_rows(n)
- Rglpk.glp_add_rows(@lp,n)
+ Glpk_wrapper.glp_add_rows(@lp,n)
s = @rows.size
n.times{|i| @rows << GLPK::Row.new(self,s+i+1)}
@rows
end
def add_cols(n)
- Rglpk.glp_add_cols(@lp,n)
+ Glpk_wrapper.glp_add_cols(@lp,n)
s = @cols.size
n.times{|i| @cols << GLPK::Column.new(self,s+i+1)}
@cols
@@ -103,9 +103,9 @@ def del_rows(a)
#ensure the array of rows tro delete is sorted and unique
a = a.sort.uniq
- r = Rglpk.new_intArray(a.size+1)
- a.each_with_index{|n,i| Rglpk.intArray_setitem(r,i+1,n)}
- Rglpk.glp_del_rows(@lp,a.size,r)
+ r = Glpk_wrapper.new_intArray(a.size+1)
+ a.each_with_index{|n,i| Glpk_wrapper.intArray_setitem(r,i+1,n)}
+ Glpk_wrapper.glp_del_rows(@lp,a.size,r)
a.each do |n|
@rows.delete_at(n)
@@ -121,9 +121,9 @@ def del_cols(a)
#ensure the array of rows tro delete is sorted and unique
a = a.sort.uniq
- r = Rglpk.new_intArray(a.size+1)
- a.each_with_index{|n,i| Rglpk.intArray_setitem(r,i+1,n)}
- Rglpk.glp_del_cols(@lp,a.size,r)
+ r = Glpk_wrapper.new_intArray(a.size+1)
+ a.each_with_index{|n,i| Glpk_wrapper.intArray_setitem(r,i+1,n)}
+ Glpk_wrapper.glp_del_cols(@lp,a.size,r)
a.each do |n|
@cols.delete_at(n)
@@ -137,30 +137,30 @@ def del_cols(a)
def set_matrix(v)
- nr = Rglpk.glp_get_num_rows(@lp)
- nc = Rglpk.glp_get_num_cols(@lp)
+ nr = Glpk_wrapper.glp_get_num_rows(@lp)
+ nc = Glpk_wrapper.glp_get_num_cols(@lp)
- ia = Rglpk.new_intArray(v.size+1)
- ja = Rglpk.new_intArray(v.size+1)
- ar = Rglpk.new_doubleArray(v.size+1)
+ ia = Glpk_wrapper.new_intArray(v.size+1)
+ ja = Glpk_wrapper.new_intArray(v.size+1)
+ ar = Glpk_wrapper.new_doubleArray(v.size+1)
v.each_with_index do |x,y|
rn = (y+nr) / nc
cn = (y % nc) + 1
- Rglpk.intArray_setitem(ia,y+1,rn) # 1,1,2,2
- Rglpk.intArray_setitem(ja,y+1,cn) # 1,2,1,2
- Rglpk.doubleArray_setitem(ar,y+1,x)
+ Glpk_wrapper.intArray_setitem(ia,y+1,rn) # 1,1,2,2
+ Glpk_wrapper.intArray_setitem(ja,y+1,cn) # 1,2,1,2
+ Glpk_wrapper.doubleArray_setitem(ar,y+1,x)
end
- Rglpk.glp_load_matrix(@lp,v.size,ia,ja,ar)
+ Glpk_wrapper.glp_load_matrix(@lp,v.size,ia,ja,ar)
end
def simplex(options)
- parm = Rglpk::Glp_smcp.new
- Rglpk.glp_init_smcp(parm)
+ parm = Glpk_wrapper::Glp_smcp.new
+ Glpk_wrapper.glp_init_smcp(parm)
#Default to errors only temrinal output
parm.msg_lev = GLPK::GLP_MSG_ERR
@@ -174,11 +174,11 @@ def simplex(options)
end
end
- Rglpk.glp_simplex(@lp,parm)
+ Glpk_wrapper.glp_simplex(@lp,parm)
end
def status
- Rglpk.glp_get_status(@lp)
+ Glpk_wrapper.glp_get_status(@lp)
end
end
@@ -190,21 +190,21 @@ def initialize(problem,i)
@i = i
end
def name=(n)
- Rglpk.glp_set_row_name(@p.lp,@i,n)
+ Glpk_wrapper.glp_set_row_name(@p.lp,@i,n)
end
def name
- Rglpk.glp_get_row_name(@p.lp,@i)
+ Glpk_wrapper.glp_get_row_name(@p.lp,@i)
end
def set_bounds(type,lb,ub)
raise ArgumentError unless GLPK::TypeConstants.include?(type)
lb = 0.0 if lb.nil?
ub = 0.0 if ub.nil?
- Rglpk.glp_set_row_bnds(@p.lp,@i,type,lb.to_f,ub.to_f)
+ Glpk_wrapper.glp_set_row_bnds(@p.lp,@i,type,lb.to_f,ub.to_f)
end
def bounds
- t = Rglpk.glp_get_row_type(@p.lp,@i)
- lb = Rglpk.glp_get_row_lb(@p.lp,@i)
- ub = Rglpk.glp_get_row_ub(@p.lp,@i)
+ t = Glpk_wrapper.glp_get_row_type(@p.lp,@i)
+ lb = Glpk_wrapper.glp_get_row_lb(@p.lp,@i)
+ ub = Glpk_wrapper.glp_get_row_ub(@p.lp,@i)
lb = (t == GLPK::GLP_FR or t == GLPK::GLP_UP) ? nil : lb
ub = (t == GLPK::GLP_FR or t == GLPK::GLP_LO) ? nil : ub
@@ -213,22 +213,22 @@ def bounds
end
def set(v)
raise RuntimeError unless v.size == @p.cols.size
- ind = Rglpk.new_intArray(v.size+1)
- val = Rglpk.new_doubleArray(v.size+1)
+ ind = Glpk_wrapper.new_intArray(v.size+1)
+ val = Glpk_wrapper.new_doubleArray(v.size+1)
- 1.upto(v.size){|x| Rglpk.intArray_setitem(ind,x,x)}
- v.each_with_index{|x,y| Rglpk.doubleArray_setitem(val,y+1,x)}
+ 1.upto(v.size){|x| Glpk_wrapper.intArray_setitem(ind,x,x)}
+ v.each_with_index{|x,y| Glpk_wrapper.doubleArray_setitem(val,y+1,x)}
- Rglpk.glp_set_mat_row(@p.lp,@i,v.size,ind,val)
+ Glpk_wrapper.glp_set_mat_row(@p.lp,@i,v.size,ind,val)
end
def get
- ind = Rglpk.new_intArray(@p.cols.size+1)
- val = Rglpk.new_doubleArray(@p.cols.size+1)
- len = Rglpk.glp_get_mat_row(@p.lp,@i,ind,val)
+ ind = Glpk_wrapper.new_intArray(@p.cols.size+1)
+ val = Glpk_wrapper.new_doubleArray(@p.cols.size+1)
+ len = Glpk_wrapper.glp_get_mat_row(@p.lp,@i,ind,val)
row = Array.new(@p.cols.size,0)
len.times do |i|
- v = Rglpk.doubleArray_getitem(val,i+1)
- j = Rglpk.intArray_getitem(ind,i+1)
+ v = Glpk_wrapper.doubleArray_getitem(val,i+1)
+ j = Glpk_wrapper.intArray_getitem(ind,i+1)
row[j-1] = v
end
return row
@@ -241,21 +241,21 @@ def initialize(problem,i)
@j = i
end
def name=(n)
- Rglpk.glp_set_col_name(@p.lp,@j,n)
+ Glpk_wrapper.glp_set_col_name(@p.lp,@j,n)
end
def name
- Rglpk.glp_get_col_name(@p.lp,@j)
+ Glpk_wrapper.glp_get_col_name(@p.lp,@j)
end
def set_bounds(type,lb,ub)
raise ArgumentError unless GLPK::TypeConstants.include?(type)
lb = 0.0 if lb.nil?
ub = 0.0 if ub.nil?
- Rglpk.glp_set_col_bnds(@p.lp,@j,type,lb,ub)
+ Glpk_wrapper.glp_set_col_bnds(@p.lp,@j,type,lb,ub)
end
def bounds
- t = Rglpk.glp_get_col_type(@p.lp,@j)
- lb = Rglpk.glp_get_col_lb(@p.lp,@j)
- ub = Rglpk.glp_get_col_ub(@p.lp,@j)
+ t = Glpk_wrapper.glp_get_col_type(@p.lp,@j)
+ lb = Glpk_wrapper.glp_get_col_lb(@p.lp,@j)
+ ub = Glpk_wrapper.glp_get_col_ub(@p.lp,@j)
lb = (t == GLPK::GLP_FR or t == GLPK::GLP_UP) ? nil : lb
ub = (t == GLPK::GLP_FR or t == GLPK::GLP_LO) ? nil : ub
@@ -264,22 +264,22 @@ def bounds
end
def set(v)
raise RuntimeError unless v.size == @p.rows.size
- ind = Rglpk.new_intArray(v.size+1)
- val = Rglpk.new_doubleArray(v.size+1)
+ ind = Glpk_wrapper.new_intArray(v.size+1)
+ val = Glpk_wrapper.new_doubleArray(v.size+1)
- 1.upto(v.size){|x| Rglpk.intArray_setitem(ind,x,x)}
- v.each_with_index{|x,y| Rglpk.doubleArray_setitem(val,y+1,x)}
+ 1.upto(v.size){|x| Glpk_wrapper.intArray_setitem(ind,x,x)}
+ v.each_with_index{|x,y| Glpk_wrapper.doubleArray_setitem(val,y+1,x)}
- Rglpk.glp_set_mat_col(@p.lp,@j,v.size,ind,val)
+ Glpk_wrapper.glp_set_mat_col(@p.lp,@j,v.size,ind,val)
end
def get
- ind = Rglpk.new_intArray(@p.rows.size+1)
- val = Rglpk.new_doubleArray(@p.rows.size+1)
- len = Rglpk.glp_get_mat_col(@p.lp,@j,ind,val)
+ ind = Glpk_wrapper.new_intArray(@p.rows.size+1)
+ val = Glpk_wrapper.new_doubleArray(@p.rows.size+1)
+ len = Glpk_wrapper.glp_get_mat_col(@p.lp,@j,ind,val)
col = Array.new(@p.rows.size,0)
len.times do |i|
- v = Rglpk.doubleArray_getitem(val,i+1)
- j = Rglpk.intArray_getitem(ind,i+1)
+ v = Glpk_wrapper.doubleArray_getitem(val,i+1)
+ j = Glpk_wrapper.intArray_getitem(ind,i+1)
col[j-1] = v
end
return col
@@ -291,30 +291,30 @@ def initialize(problem)
@p = problem
end
def name=(n)
- Rglpk.glp_set_obj_name(@p.lp,n)
+ Glpk_wrapper.glp_set_obj_name(@p.lp,n)
end
def name
- Rglpk.glp_get_obj_name(@p.lp)
+ Glpk_wrapper.glp_get_obj_name(@p.lp)
end
def dir=(d)
raise ArgumentError if d != GLPK::GLP_MIN and d != GLPK::GLP_MAX
- Rglpk.glp_set_obj_dir(@p.lp,d)
+ Glpk_wrapper.glp_set_obj_dir(@p.lp,d)
end
def dir
- Rglpk.glp_get_obj_dir(@p.lp)
+ Glpk_wrapper.glp_get_obj_dir(@p.lp)
end
def set_coef(j,coef)
- Rglpk.glp_set_obj_coef(@p.lp,j,coef)
+ Glpk_wrapper.glp_set_obj_coef(@p.lp,j,coef)
end
def coefs=(a)
- @p.cols.each{|c| Rglpk.glp_set_obj_coef(@p.lp,c.j,a[c.j-1])}
+ @p.cols.each{|c| Glpk_wrapper.glp_set_obj_coef(@p.lp,c.j,a[c.j-1])}
a
end
def coefs
- @p.cols.map{|c| Rglpk.glp_get_obj_coef(@p.lp,c.j)}
+ @p.cols.map{|c| Glpk_wrapper.glp_get_obj_coef(@p.lp,c.j)}
end
def get
- Rglpk.glp_get_obj_val(@p.lp)
+ Glpk_wrapper.glp_get_obj_val(@p.lp)
end
end
end
View
4 swig/Makefile.in
@@ -1,4 +1,4 @@
-rglpk.c: glpk.i
+glpk_wrapper.c: glpk.i
@SWIG@ -I/usr/local/include -ruby -w801 -o $@ $?
-wrap: rglpk.c
+wrap: glpk_wrapper.c
cp $? ../ext/$?
View
2  swig/glpk.i
@@ -23,7 +23,7 @@
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-%module rglpk
+%module glpk_wrapper
%{
#include "glpk.h"
Please sign in to comment.
Something went wrong with that request. Please try again.