summaryrefslogtreecommitdiff
path: root/packages/glpk
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-08 13:43:07 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-08 13:43:07 +0200
commit551cf7498c33bc0948bb4cb8444ae6f8af7278ea (patch)
treeec86ff73151746f5e13b83549ea5c60ed442764d /packages/glpk
parent561a6c0e21bb77c21114ccbbd86d3af5ddb5a3f1 (diff)
separation ok
Diffstat (limited to 'packages/glpk')
-rw-r--r--packages/glpk/hmatrix-glpk.cabal4
-rw-r--r--packages/glpk/lib/Numeric/LinearProgramming.hs5
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/glpk/hmatrix-glpk.cabal b/packages/glpk/hmatrix-glpk.cabal
index b770cfa..96f53eb 100644
--- a/packages/glpk/hmatrix-glpk.cabal
+++ b/packages/glpk/hmatrix-glpk.cabal
@@ -1,5 +1,5 @@
1Name: hmatrix-glpk 1Name: hmatrix-glpk
2Version: 0.3.1 2Version: 0.4.0
3License: GPL 3License: GPL
4License-file: LICENSE 4License-file: LICENSE
5Author: Alberto Ruiz 5Author: Alberto Ruiz
@@ -22,7 +22,7 @@ extra-source-files: examples/simplex1.hs
22 examples/simplex4.hs 22 examples/simplex4.hs
23 23
24library 24library
25 Build-Depends: base >= 3 && < 5, hmatrix >= 0.8.3 25 Build-Depends: base, hmatrix-base
26 26
27 hs-source-dirs: lib 27 hs-source-dirs: lib
28 28
diff --git a/packages/glpk/lib/Numeric/LinearProgramming.hs b/packages/glpk/lib/Numeric/LinearProgramming.hs
index 6a3e186..25cdab2 100644
--- a/packages/glpk/lib/Numeric/LinearProgramming.hs
+++ b/packages/glpk/lib/Numeric/LinearProgramming.hs
@@ -5,7 +5,7 @@ Module : Numeric.LinearProgramming
5Copyright : (c) Alberto Ruiz 2010 5Copyright : (c) Alberto Ruiz 2010
6License : GPL 6License : GPL
7 7
8Maintainer : Alberto Ruiz (aruiz at um dot es) 8Maintainer : Alberto Ruiz
9Stability : provisional 9Stability : provisional
10 10
11This module provides an interface to the standard simplex algorithm. 11This module provides an interface to the standard simplex algorithm.
@@ -67,7 +67,7 @@ module Numeric.LinearProgramming(
67 Solution(..) 67 Solution(..)
68) where 68) where
69 69
70import Numeric.LinearAlgebra hiding (i) 70import Data.Packed
71import Data.Packed.Development 71import Data.Packed.Development
72import Foreign(Ptr) 72import Foreign(Ptr)
73import System.IO.Unsafe(unsafePerformIO) 73import System.IO.Unsafe(unsafePerformIO)
@@ -224,7 +224,6 @@ foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse
224simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double 224simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double
225simplexSparse m n c b = unsafePerformIO $ do 225simplexSparse m n c b = unsafePerformIO $ do
226 s <- createVector (2+n) 226 s <- createVector (2+n)
227 let fi = fromIntegral
228 app3 (c_simplex_sparse (fi m) (fi n)) mat (cmat c) mat (cmat b) vec s "c_simplex_sparse" 227 app3 (c_simplex_sparse (fi m) (fi n)) mat (cmat c) mat (cmat b) vec s "c_simplex_sparse"
229 return s 228 return s
230 229