summaryrefslogtreecommitdiff
path: root/packages/glpk
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2016-11-02 19:15:21 +0100
committerAlberto Ruiz <aruiz@um.es>2016-11-02 19:15:21 +0100
commit97137a6f8b8bf58c56dd075a3991f9f059001c9f (patch)
tree3ef3eea8b67cdc3a4e98bc3711ce7d17fa191f7b /packages/glpk
parenta326060dd1cf43bd3050126a9801d97a1d2da7e6 (diff)
fix wrapper in glpk
Diffstat (limited to 'packages/glpk')
-rw-r--r--packages/glpk/src/Numeric/LinearProgramming.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/glpk/src/Numeric/LinearProgramming.hs b/packages/glpk/src/Numeric/LinearProgramming.hs
index 0a776fa..8c69969 100644
--- a/packages/glpk/src/Numeric/LinearProgramming.hs
+++ b/packages/glpk/src/Numeric/LinearProgramming.hs
@@ -275,10 +275,10 @@ mkConstrS n objfun b1 = fromLists (ob ++ co) where
275 275
276----------------------------------------------------- 276-----------------------------------------------------
277 277
278(##) :: TransArray c => TransRaw c b -> c -> b 278--(##) :: TransArray c => TransRaw c b -> c -> b
279infixl 1 ## 279--infixl 1 ##
280a ## b = applyRaw a b 280--a ## b = applyRaw a b
281{-# INLINE (##) #-} 281--{-# INLINE (##) #-}
282 282
283foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse 283foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse
284 :: CInt -> CInt -- rows and cols 284 :: CInt -> CInt -- rows and cols
@@ -290,7 +290,7 @@ foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse
290simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double 290simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double
291simplexSparse m n c b = unsafePerformIO $ do 291simplexSparse m n c b = unsafePerformIO $ do
292 s <- createVector (2+n) 292 s <- createVector (2+n)
293 c_simplex_sparse (fi m) (fi n) ## (cmat c) ## (cmat b) ## s #|"c_simplex_sparse" 293 ((cmat c) `applyRaw` ((cmat b) `applyRaw` (s `applyRaw` id))) (c_simplex_sparse (fi m) (fi n)) #|"c_simplex_sparse"
294 return s 294 return s
295 295
296foreign import ccall unsafe "c_exact_sparse" c_exact_sparse 296foreign import ccall unsafe "c_exact_sparse" c_exact_sparse
@@ -303,7 +303,7 @@ foreign import ccall unsafe "c_exact_sparse" c_exact_sparse
303exactSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double 303exactSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double
304exactSparse m n c b = unsafePerformIO $ do 304exactSparse m n c b = unsafePerformIO $ do
305 s <- createVector (2+n) 305 s <- createVector (2+n)
306 c_exact_sparse (fi m) (fi n) ## (cmat c) ## (cmat b) ## s #|"c_exact_sparse" 306 ((cmat c) `applyRaw` ((cmat b) `applyRaw` (s `applyRaw` id))) (c_exact_sparse (fi m) (fi n)) #|"c_exact_sparse"
307 return s 307 return s
308 308
309glpFR, glpLO, glpUP, glpDB, glpFX :: Double 309glpFR, glpLO, glpUP, glpDB, glpFX :: Double