summaryrefslogtreecommitdiffstats
path: root/external/glpk/function_description.ml
diff options
context:
space:
mode:
Diffstat (limited to 'external/glpk/function_description.ml')
-rw-r--r--external/glpk/function_description.ml37
1 files changed, 37 insertions, 0 deletions
diff --git a/external/glpk/function_description.ml b/external/glpk/function_description.ml
new file mode 100644
index 0000000..3dd469a
--- /dev/null
+++ b/external/glpk/function_description.ml
@@ -0,0 +1,37 @@
+open Ctypes
+
+module Types = Types_generated
+
+module Functions (F : Ctypes.FOREIGN) = struct
+ open F
+
+ let glp_create_prob = foreign "glp_create_prob" (void @-> returning Types.glp_prob)
+
+ let glp_delete_prob = foreign "glp_delete_prob" (Types.glp_prob @-> returning void)
+
+ let glp_add_rows = foreign "glp_add_rows" (Types.glp_prob @-> int @-> returning void)
+
+ let glp_add_cols = foreign "glp_add_cols" (Types.glp_prob @-> int @-> returning void)
+
+ let glp_set_row_bnds = foreign "glp_set_row_bnds" (Types.glp_prob @-> int @-> int @-> double @-> double @-> returning void)
+
+ let glp_set_col_bnds = foreign "glp_set_col_bnds" (Types.glp_prob @-> int @-> int @-> double @-> double @-> returning void)
+
+ let glp_set_col_kind = foreign "glp_set_col_kind" (Types.glp_prob @-> int @-> int @-> returning void)
+
+ let glp_set_obj_coef = foreign "glp_set_obj_coef" (Types.glp_prob @-> int @-> double @-> returning void)
+
+ let glp_set_obj_dir = foreign "glp_set_obj_dir" (Types.glp_prob @-> int @-> returning void)
+
+ let glp_set_mat_col = foreign "glp_set_mat_col" (Types.glp_prob @-> int @-> int @-> ptr int @-> ptr double @-> returning void)
+
+ let glp_simplex = foreign "glp_simplex" (Types.glp_prob @-> Types.glp_smcp_ptr @-> returning void)
+
+ let glp_intopt = foreign "glp_intopt" (Types.glp_prob @-> Types.glp_iocp_ptr @-> returning void)
+
+ let glp_mip_status = foreign "glp_mip_status" (Types.glp_prob @-> returning int)
+
+ let glp_mip_obj_val = foreign "glp_mip_obj_val" (Types.glp_prob @-> returning double)
+
+ let glp_term_out = foreign "glp_term_out" (int @-> returning int)
+end