From 97137a6f8b8bf58c56dd075a3991f9f059001c9f Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 2 Nov 2016 19:15:21 +0100 Subject: fix wrapper in glpk --- packages/glpk/src/Numeric/LinearProgramming.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'packages/glpk/src') 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 ----------------------------------------------------- -(##) :: TransArray c => TransRaw c b -> c -> b -infixl 1 ## -a ## b = applyRaw a b -{-# INLINE (##) #-} +--(##) :: TransArray c => TransRaw c b -> c -> b +--infixl 1 ## +--a ## b = applyRaw a b +--{-# INLINE (##) #-} foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse :: CInt -> CInt -- rows and cols @@ -290,7 +290,7 @@ foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double simplexSparse m n c b = unsafePerformIO $ do s <- createVector (2+n) - c_simplex_sparse (fi m) (fi n) ## (cmat c) ## (cmat b) ## s #|"c_simplex_sparse" + ((cmat c) `applyRaw` ((cmat b) `applyRaw` (s `applyRaw` id))) (c_simplex_sparse (fi m) (fi n)) #|"c_simplex_sparse" return s foreign import ccall unsafe "c_exact_sparse" c_exact_sparse @@ -303,7 +303,7 @@ foreign import ccall unsafe "c_exact_sparse" c_exact_sparse exactSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double exactSparse m n c b = unsafePerformIO $ do s <- createVector (2+n) - c_exact_sparse (fi m) (fi n) ## (cmat c) ## (cmat b) ## s #|"c_exact_sparse" + ((cmat c) `applyRaw` ((cmat b) `applyRaw` (s `applyRaw` id))) (c_exact_sparse (fi m) (fi n)) #|"c_exact_sparse" return s glpFR, glpLO, glpUP, glpDB, glpFX :: Double -- cgit v1.2.3