aboutsummaryrefslogtreecommitdiff
path: root/Math/LinProg/LPSolve
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2014-10-30 07:03:03 +1100
committerJustin Bedo <cu@cua0.org>2014-10-30 07:13:33 +1100
commit946d8bcd81c1ea580032cd9f8140aad223b3156f (patch)
treeae7c55ecef51fc56f74388435927c71dc5ea0c65 /Math/LinProg/LPSolve
parentd68fb49cad1a5bba7e52c7ff464d15c867052d0f (diff)
Bugfix: alignment of variables in solution was incorrect
Diffstat (limited to 'Math/LinProg/LPSolve')
-rw-r--r--Math/LinProg/LPSolve/FFI.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Math/LinProg/LPSolve/FFI.hs b/Math/LinProg/LPSolve/FFI.hs
index ff0bc16..64919b9 100644
--- a/Math/LinProg/LPSolve/FFI.hs
+++ b/Math/LinProg/LPSolve/FFI.hs
@@ -13,6 +13,7 @@ module Math.LinProg.LPSolve.FFI (
,setRHS
,solve
,getSol
+ ,debugDump
) where
import Foreign
@@ -56,6 +57,10 @@ foreign import ccall "set_constr_type" c_set_constr_type :: LPRec -> CInt -> CIn
foreign import ccall "set_timeout" c_set_timeout :: LPRec -> CLong -> IO ()
foreign import ccall "set_int" c_set_int :: LPRec -> CInt -> CChar -> IO CChar
foreign import ccall "set_binary" c_set_binary :: LPRec -> CInt -> CChar -> IO CChar
+foreign import ccall "print_debugdump" c_print_debugdump :: LPRec -> CString -> IO ()
+
+debugDump :: LPRec -> FilePath -> IO ()
+debugDump lp path = withCString path $ \str -> c_print_debugdump lp str
setTimeout :: LPRec -> Integer -> IO ()
setTimeout lp x = c_set_timeout lp (fromIntegral x)