diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/glpk/hmatrix-glpk.cabal | 3 | ||||
-rw-r--r-- | packages/tests/hmatrix-tests.cabal | 4 | ||||
-rw-r--r-- | packages/tests/src/Numeric/LinearAlgebra/Tests.hs | 13 |
3 files changed, 12 insertions, 8 deletions
diff --git a/packages/glpk/hmatrix-glpk.cabal b/packages/glpk/hmatrix-glpk.cabal index 81f9e1d..046563e 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.0 | 2 | Version: 0.3.1 |
3 | License: GPL | 3 | License: GPL |
4 | License-file: LICENSE | 4 | License-file: LICENSE |
5 | Author: Alberto Ruiz | 5 | Author: Alberto Ruiz |
@@ -35,6 +35,7 @@ library | |||
35 | extra-libraries: glpk | 35 | extra-libraries: glpk |
36 | 36 | ||
37 | if os(OSX) | 37 | if os(OSX) |
38 | extra-lib-dirs: /usr/lib | ||
38 | extra-lib-dirs: /opt/local/lib/ | 39 | extra-lib-dirs: /opt/local/lib/ |
39 | include-dirs: /opt/local/include/ | 40 | include-dirs: /opt/local/include/ |
40 | extra-lib-dirs: /usr/local/lib/ | 41 | extra-lib-dirs: /usr/local/lib/ |
diff --git a/packages/tests/hmatrix-tests.cabal b/packages/tests/hmatrix-tests.cabal index d1f449b..ca4c013 100644 --- a/packages/tests/hmatrix-tests.cabal +++ b/packages/tests/hmatrix-tests.cabal | |||
@@ -1,5 +1,5 @@ | |||
1 | Name: hmatrix-tests | 1 | Name: hmatrix-tests |
2 | Version: 0.1.1 | 2 | Version: 0.2 |
3 | License: GPL | 3 | License: GPL |
4 | License-file: LICENSE | 4 | License-file: LICENSE |
5 | Author: Alberto Ruiz | 5 | Author: Alberto Ruiz |
@@ -21,7 +21,7 @@ extra-source-files: CHANGES | |||
21 | library | 21 | library |
22 | 22 | ||
23 | Build-Depends: base >= 4 && < 5, | 23 | Build-Depends: base >= 4 && < 5, |
24 | hmatrix >= 0.13, | 24 | hmatrix >= 0.14, |
25 | QuickCheck >= 2, HUnit, random | 25 | QuickCheck >= 2, HUnit, random |
26 | 26 | ||
27 | hs-source-dirs: src | 27 | hs-source-dirs: src |
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs index 7c41209..fd66767 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs | |||
@@ -169,11 +169,14 @@ rootFindingTest = TestList [ utest "root Hybrids" (fst sol1 ~~ [1,1]) | |||
169 | 169 | ||
170 | --------------------------------------------------------------------- | 170 | --------------------------------------------------------------------- |
171 | 171 | ||
172 | odeTest = utest "ode" (last (toLists sol) ~~ [-1.7588880332411019, 8.364348908711941e-2]) | 172 | odeTest = utest "ode" (last (toLists sol) ~~ newsol) |
173 | where sol = odeSolveV RK8pd 1E-6 1E-6 0 (l2v $ vanderpol 10) Nothing (fromList [1,0]) ts | 173 | where |
174 | ts = linspace 101 (0,100) | 174 | sol = odeSolveV RK8pd 1E-6 1E-6 0 (l2v $ vanderpol 10) (fromList [1,0]) ts |
175 | l2v f = \t -> fromList . f t . toList | 175 | ts = linspace 101 (0,100) |
176 | vanderpol mu _t [x,y] = [y, -x + mu * y * (1-x^2) ] | 176 | l2v f = \t -> fromList . f t . toList |
177 | vanderpol mu _t [x,y] = [y, -x + mu * y * (1-x^2) ] | ||
178 | newsol = [-1.758888036617841, 8.364349410519058e-2] | ||
179 | -- oldsol = [-1.7588880332411019, 8.364348908711941e-2] | ||
177 | 180 | ||
178 | --------------------------------------------------------------------- | 181 | --------------------------------------------------------------------- |
179 | 182 | ||