diff options
author | Alberto Ruiz <aruiz@um.es> | 2016-11-02 19:15:21 +0100 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2016-11-02 19:15:21 +0100 |
commit | 97137a6f8b8bf58c56dd075a3991f9f059001c9f (patch) | |
tree | 3ef3eea8b67cdc3a4e98bc3711ce7d17fa191f7b /packages | |
parent | a326060dd1cf43bd3050126a9801d97a1d2da7e6 (diff) |
fix wrapper in glpk
Diffstat (limited to 'packages')
-rw-r--r-- | packages/glpk/src/Numeric/LinearProgramming.hs | 12 |
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 |
279 | infixl 1 ## | 279 | --infixl 1 ## |
280 | a ## b = applyRaw a b | 280 | --a ## b = applyRaw a b |
281 | {-# INLINE (##) #-} | 281 | --{-# INLINE (##) #-} |
282 | 282 | ||
283 | foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse | 283 | foreign 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 | |||
290 | simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double | 290 | simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double |
291 | simplexSparse m n c b = unsafePerformIO $ do | 291 | simplexSparse 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 | ||
296 | foreign import ccall unsafe "c_exact_sparse" c_exact_sparse | 296 | foreign import ccall unsafe "c_exact_sparse" c_exact_sparse |
@@ -303,7 +303,7 @@ foreign import ccall unsafe "c_exact_sparse" c_exact_sparse | |||
303 | exactSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double | 303 | exactSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double |
304 | exactSparse m n c b = unsafePerformIO $ do | 304 | exactSparse 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 | ||
309 | glpFR, glpLO, glpUP, glpDB, glpFX :: Double | 309 | glpFR, glpLO, glpUP, glpDB, glpFX :: Double |