diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-08 13:43:07 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-08 13:43:07 +0200 |
commit | 551cf7498c33bc0948bb4cb8444ae6f8af7278ea (patch) | |
tree | ec86ff73151746f5e13b83549ea5c60ed442764d /packages/glpk | |
parent | 561a6c0e21bb77c21114ccbbd86d3af5ddb5a3f1 (diff) |
separation ok
Diffstat (limited to 'packages/glpk')
-rw-r--r-- | packages/glpk/hmatrix-glpk.cabal | 4 | ||||
-rw-r--r-- | packages/glpk/lib/Numeric/LinearProgramming.hs | 5 |
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 @@ | |||
1 | Name: hmatrix-glpk | 1 | Name: hmatrix-glpk |
2 | Version: 0.3.1 | 2 | Version: 0.4.0 |
3 | License: GPL | 3 | License: GPL |
4 | License-file: LICENSE | 4 | License-file: LICENSE |
5 | Author: Alberto Ruiz | 5 | Author: Alberto Ruiz |
@@ -22,7 +22,7 @@ extra-source-files: examples/simplex1.hs | |||
22 | examples/simplex4.hs | 22 | examples/simplex4.hs |
23 | 23 | ||
24 | library | 24 | library |
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 | |||
5 | Copyright : (c) Alberto Ruiz 2010 | 5 | Copyright : (c) Alberto Ruiz 2010 |
6 | License : GPL | 6 | License : GPL |
7 | 7 | ||
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | 8 | Maintainer : Alberto Ruiz |
9 | Stability : provisional | 9 | Stability : provisional |
10 | 10 | ||
11 | This module provides an interface to the standard simplex algorithm. | 11 | This 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 | ||
70 | import Numeric.LinearAlgebra hiding (i) | 70 | import Data.Packed |
71 | import Data.Packed.Development | 71 | import Data.Packed.Development |
72 | import Foreign(Ptr) | 72 | import Foreign(Ptr) |
73 | import System.IO.Unsafe(unsafePerformIO) | 73 | import System.IO.Unsafe(unsafePerformIO) |
@@ -224,7 +224,6 @@ foreign import ccall unsafe "c_simplex_sparse" c_simplex_sparse | |||
224 | simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double | 224 | simplexSparse :: Int -> Int -> Matrix Double -> Matrix Double -> Vector Double |
225 | simplexSparse m n c b = unsafePerformIO $ do | 225 | simplexSparse 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 | ||