diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base/hmatrix-base.cabal | 13 | ||||
-rw-r--r-- | packages/base/src/Data/Packed/IO.hs | 141 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra.hs (renamed from packages/hmatrix/src/Numeric/LinearAlgebra.hs) | 0 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/LAPACK.hs | 2 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Util.hs (renamed from packages/hmatrix/src/Numeric/LinearAlgebra/Util.hs) | 7 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs (renamed from packages/hmatrix/src/Numeric/LinearAlgebra/Util/Convolution.hs) | 1 | ||||
-rw-r--r-- | packages/hmatrix/hmatrix.cabal | 5 | ||||
-rw-r--r-- | packages/hmatrix/src/Numeric/HMatrix.hs | 4 | ||||
-rw-r--r-- | packages/hmatrix/src/Numeric/IO.hs | 120 | ||||
-rw-r--r-- | packages/hmatrix/src/Numeric/Random.hs | 3 |
10 files changed, 162 insertions, 134 deletions
diff --git a/packages/base/hmatrix-base.cabal b/packages/base/hmatrix-base.cabal index 9a84b7e..3f12dad 100644 --- a/packages/base/hmatrix-base.cabal +++ b/packages/base/hmatrix-base.cabal | |||
@@ -38,11 +38,11 @@ library | |||
38 | Numeric.Conversion | 38 | Numeric.Conversion |
39 | Numeric.LinearAlgebra.LAPACK | 39 | Numeric.LinearAlgebra.LAPACK |
40 | Numeric.LinearAlgebra.Algorithms | 40 | Numeric.LinearAlgebra.Algorithms |
41 | Data.Packed.Numeric | ||
42 | Numeric.Vectorized | ||
43 | Numeric.Vector | ||
44 | Numeric.Matrix | ||
45 | Numeric.Container | 41 | Numeric.Container |
42 | Numeric.LinearAlgebra | ||
43 | Numeric.LinearAlgebra.Util | ||
44 | Numeric.LinearAlgebra.Util.Convolution | ||
45 | Data.Packed.IO | ||
46 | 46 | ||
47 | other-modules: Data.Packed.Internal, | 47 | other-modules: Data.Packed.Internal, |
48 | Data.Packed.Internal.Common, | 48 | Data.Packed.Internal.Common, |
@@ -50,6 +50,11 @@ library | |||
50 | Data.Packed.Internal.Vector, | 50 | Data.Packed.Internal.Vector, |
51 | Data.Packed.Internal.Matrix | 51 | Data.Packed.Internal.Matrix |
52 | Numeric.Chain | 52 | Numeric.Chain |
53 | Numeric.Vectorized | ||
54 | Numeric.Vector | ||
55 | Numeric.Matrix | ||
56 | Data.Packed.Numeric | ||
57 | |||
53 | 58 | ||
54 | C-sources: src/C/lapack-aux.c | 59 | C-sources: src/C/lapack-aux.c |
55 | src/C/vector-aux.c | 60 | src/C/vector-aux.c |
diff --git a/packages/base/src/Data/Packed/IO.hs b/packages/base/src/Data/Packed/IO.hs new file mode 100644 index 0000000..dbb2943 --- /dev/null +++ b/packages/base/src/Data/Packed/IO.hs | |||
@@ -0,0 +1,141 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | -- | | ||
3 | -- Module : Data.Packed.IO | ||
4 | -- Copyright : (c) Alberto Ruiz 2010 | ||
5 | -- License : BSD3 | ||
6 | -- | ||
7 | -- Maintainer : Alberto Ruiz | ||
8 | -- Stability : provisional | ||
9 | -- | ||
10 | -- Display, formatting and IO functions for numeric 'Vector' and 'Matrix' | ||
11 | -- | ||
12 | ----------------------------------------------------------------------------- | ||
13 | {-# OPTIONS_HADDOCK hide #-} | ||
14 | |||
15 | module Data.Packed.IO ( | ||
16 | dispf, disps, dispcf, vecdisp, latexFormat, format, | ||
17 | readMatrix, fromArray2D | ||
18 | ) where | ||
19 | |||
20 | import Data.Packed | ||
21 | import Data.Packed.Development | ||
22 | import Text.Printf(printf) | ||
23 | import Data.List(intersperse) | ||
24 | import Data.Complex | ||
25 | |||
26 | {- | Creates a string from a matrix given a separator and a function to show each entry. Using | ||
27 | this function the user can easily define any desired display function: | ||
28 | |||
29 | @import Text.Printf(printf)@ | ||
30 | |||
31 | @disp = putStr . format \" \" (printf \"%.2f\")@ | ||
32 | |||
33 | -} | ||
34 | format :: (Element t) => String -> (t -> String) -> Matrix t -> String | ||
35 | format sep f m = table sep . map (map f) . toLists $ m | ||
36 | |||
37 | {- | Show a matrix with \"autoscaling\" and a given number of decimal places. | ||
38 | |||
39 | >>> putStr . disps 2 $ 120 * (3><4) [1..] | ||
40 | 3x4 E3 | ||
41 | 0.12 0.24 0.36 0.48 | ||
42 | 0.60 0.72 0.84 0.96 | ||
43 | 1.08 1.20 1.32 1.44 | ||
44 | |||
45 | -} | ||
46 | disps :: Int -> Matrix Double -> String | ||
47 | disps d x = sdims x ++ " " ++ formatScaled d x | ||
48 | |||
49 | {- | Show a matrix with a given number of decimal places. | ||
50 | |||
51 | >>> dispf 2 (1/3 + ident 3) | ||
52 | "3x3\n1.33 0.33 0.33\n0.33 1.33 0.33\n0.33 0.33 1.33\n" | ||
53 | |||
54 | >>> putStr . dispf 2 $ (3><4)[1,1.5..] | ||
55 | 3x4 | ||
56 | 1.00 1.50 2.00 2.50 | ||
57 | 3.00 3.50 4.00 4.50 | ||
58 | 5.00 5.50 6.00 6.50 | ||
59 | |||
60 | >>> putStr . unlines . tail . lines . dispf 2 . asRow $ linspace 10 (0,1) | ||
61 | 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 | ||
62 | |||
63 | -} | ||
64 | dispf :: Int -> Matrix Double -> String | ||
65 | dispf d x = sdims x ++ "\n" ++ formatFixed (if isInt x then 0 else d) x | ||
66 | |||
67 | sdims x = show (rows x) ++ "x" ++ show (cols x) | ||
68 | |||
69 | formatFixed d x = format " " (printf ("%."++show d++"f")) $ x | ||
70 | |||
71 | isInt = all lookslikeInt . toList . flatten | ||
72 | |||
73 | formatScaled dec t = "E"++show o++"\n" ++ ss | ||
74 | where ss = format " " (printf fmt. g) t | ||
75 | g x | o >= 0 = x/10^(o::Int) | ||
76 | | otherwise = x*10^(-o) | ||
77 | o | rows t == 0 || cols t == 0 = 0 | ||
78 | | otherwise = floor $ maximum $ map (logBase 10 . abs) $ toList $ flatten t | ||
79 | fmt = '%':show (dec+3) ++ '.':show dec ++"f" | ||
80 | |||
81 | {- | Show a vector using a function for showing matrices. | ||
82 | |||
83 | >>> putStr . vecdisp (dispf 2) $ linspace 10 (0,1) | ||
84 | 10 |> 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 | ||
85 | |||
86 | -} | ||
87 | vecdisp :: (Element t) => (Matrix t -> String) -> Vector t -> String | ||
88 | vecdisp f v | ||
89 | = ((show (dim v) ++ " |> ") ++) . (++"\n") | ||
90 | . unwords . lines . tail . dropWhile (not . (`elem` " \n")) | ||
91 | . f . trans . reshape 1 | ||
92 | $ v | ||
93 | |||
94 | {- | Tool to display matrices with latex syntax. | ||
95 | |||
96 | >>> latexFormat "bmatrix" (dispf 2 $ ident 2) | ||
97 | "\\begin{bmatrix}\n1 & 0\n\\\\\n0 & 1\n\\end{bmatrix}" | ||
98 | |||
99 | -} | ||
100 | latexFormat :: String -- ^ type of braces: \"matrix\", \"bmatrix\", \"pmatrix\", etc. | ||
101 | -> String -- ^ Formatted matrix, with elements separated by spaces and newlines | ||
102 | -> String | ||
103 | latexFormat del tab = "\\begin{"++del++"}\n" ++ f tab ++ "\\end{"++del++"}" | ||
104 | where f = unlines . intersperse "\\\\" . map unwords . map (intersperse " & " . words) . tail . lines | ||
105 | |||
106 | -- | Pretty print a complex number with at most n decimal digits. | ||
107 | showComplex :: Int -> Complex Double -> String | ||
108 | showComplex d (a:+b) | ||
109 | | isZero a && isZero b = "0" | ||
110 | | isZero b = sa | ||
111 | | isZero a && isOne b = s2++"i" | ||
112 | | isZero a = sb++"i" | ||
113 | | isOne b = sa++s3++"i" | ||
114 | | otherwise = sa++s1++sb++"i" | ||
115 | where | ||
116 | sa = shcr d a | ||
117 | sb = shcr d b | ||
118 | s1 = if b<0 then "" else "+" | ||
119 | s2 = if b<0 then "-" else "" | ||
120 | s3 = if b<0 then "-" else "+" | ||
121 | |||
122 | shcr d a | lookslikeInt a = printf "%.0f" a | ||
123 | | otherwise = printf ("%."++show d++"f") a | ||
124 | |||
125 | |||
126 | lookslikeInt x = show (round x :: Int) ++".0" == shx || "-0.0" == shx | ||
127 | where shx = show x | ||
128 | |||
129 | isZero x = show x `elem` ["0.0","-0.0"] | ||
130 | isOne x = show x `elem` ["1.0","-1.0"] | ||
131 | |||
132 | -- | Pretty print a complex matrix with at most n decimal digits. | ||
133 | dispcf :: Int -> Matrix (Complex Double) -> String | ||
134 | dispcf d m = sdims m ++ "\n" ++ format " " (showComplex d) m | ||
135 | |||
136 | -------------------------------------------------------------------- | ||
137 | |||
138 | -- | reads a matrix from a string containing a table of numbers. | ||
139 | readMatrix :: String -> Matrix Double | ||
140 | readMatrix = fromLists . map (map read). map words . filter (not.null) . lines | ||
141 | |||
diff --git a/packages/hmatrix/src/Numeric/LinearAlgebra.hs b/packages/base/src/Numeric/LinearAlgebra.hs index 1db860c..1db860c 100644 --- a/packages/hmatrix/src/Numeric/LinearAlgebra.hs +++ b/packages/base/src/Numeric/LinearAlgebra.hs | |||
diff --git a/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs b/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs index af0c744..9cb67d4 100644 --- a/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs +++ b/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs | |||
@@ -10,6 +10,8 @@ | |||
10 | -- Functional interface to selected LAPACK functions (<http://www.netlib.org/lapack>). | 10 | -- Functional interface to selected LAPACK functions (<http://www.netlib.org/lapack>). |
11 | -- | 11 | -- |
12 | ----------------------------------------------------------------------------- | 12 | ----------------------------------------------------------------------------- |
13 | {-# OPTIONS_HADDOCK hide #-} | ||
14 | |||
13 | 15 | ||
14 | module Numeric.LinearAlgebra.LAPACK ( | 16 | module Numeric.LinearAlgebra.LAPACK ( |
15 | -- * Matrix product | 17 | -- * Matrix product |
diff --git a/packages/hmatrix/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs index e4f21b0..533c54b 100644 --- a/packages/hmatrix/src/Numeric/LinearAlgebra/Util.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs | |||
@@ -47,22 +47,23 @@ module Numeric.LinearAlgebra.Util( | |||
47 | vech, | 47 | vech, |
48 | dup, | 48 | dup, |
49 | vtrans, | 49 | vtrans, |
50 | -- * Plot | 50 | {- -- * Plot |
51 | mplot, | 51 | mplot, |
52 | plot, parametricPlot, | 52 | plot, parametricPlot, |
53 | splot, mesh, meshdom, | 53 | splot, mesh, meshdom, |
54 | matrixToPGM, imshow, | 54 | matrixToPGM, imshow, |
55 | gnuplotX, gnuplotpdf, gnuplotWin | 55 | gnuplotX, gnuplotpdf, gnuplotWin |
56 | -} | ||
56 | ) where | 57 | ) where |
57 | 58 | ||
58 | import Numeric.Container | 59 | import Numeric.Container |
59 | import Numeric.IO | 60 | import Data.Packed.IO |
60 | import Numeric.LinearAlgebra.Algorithms hiding (i) | 61 | import Numeric.LinearAlgebra.Algorithms hiding (i) |
61 | import Numeric.Matrix() | 62 | import Numeric.Matrix() |
62 | import Numeric.Vector() | 63 | import Numeric.Vector() |
63 | 64 | ||
64 | import Numeric.LinearAlgebra.Util.Convolution | 65 | import Numeric.LinearAlgebra.Util.Convolution |
65 | import Graphics.Plot | 66 | --import Graphics.Plot |
66 | 67 | ||
67 | 68 | ||
68 | {- | print a real matrix with given number of digits after the decimal point | 69 | {- | print a real matrix with given number of digits after the decimal point |
diff --git a/packages/hmatrix/src/Numeric/LinearAlgebra/Util/Convolution.hs b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs index 82de476..d04c46b 100644 --- a/packages/hmatrix/src/Numeric/LinearAlgebra/Util/Convolution.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs | |||
@@ -10,6 +10,7 @@ Stability : provisional | |||
10 | 10 | ||
11 | -} | 11 | -} |
12 | ----------------------------------------------------------------------------- | 12 | ----------------------------------------------------------------------------- |
13 | {-# OPTIONS_HADDOCK hide #-} | ||
13 | 14 | ||
14 | module Numeric.LinearAlgebra.Util.Convolution( | 15 | module Numeric.LinearAlgebra.Util.Convolution( |
15 | corr, conv, corrMin, | 16 | corr, conv, corrMin, |
diff --git a/packages/hmatrix/hmatrix.cabal b/packages/hmatrix/hmatrix.cabal index 9719c96..c79da8a 100644 --- a/packages/hmatrix/hmatrix.cabal +++ b/packages/hmatrix/hmatrix.cabal | |||
@@ -90,8 +90,6 @@ library | |||
90 | Numeric.GSL.Fitting, | 90 | Numeric.GSL.Fitting, |
91 | Numeric.GSL.ODE, | 91 | Numeric.GSL.ODE, |
92 | Numeric.GSL, | 92 | Numeric.GSL, |
93 | Numeric.LinearAlgebra, | ||
94 | Numeric.LinearAlgebra.Util, | ||
95 | Graphics.Plot, | 93 | Graphics.Plot, |
96 | Numeric.HMatrix, | 94 | Numeric.HMatrix, |
97 | Numeric.HMatrix.Data, | 95 | Numeric.HMatrix.Data, |
@@ -99,8 +97,7 @@ library | |||
99 | other-modules: Numeric.Random, | 97 | other-modules: Numeric.Random, |
100 | Numeric.GSL.Internal, | 98 | Numeric.GSL.Internal, |
101 | Numeric.GSL.Vector, | 99 | Numeric.GSL.Vector, |
102 | Numeric.IO, | 100 | Numeric.IO |
103 | Numeric.LinearAlgebra.Util.Convolution | ||
104 | 101 | ||
105 | 102 | ||
106 | C-sources: src/Numeric/GSL/gsl-aux.c | 103 | C-sources: src/Numeric/GSL/gsl-aux.c |
diff --git a/packages/hmatrix/src/Numeric/HMatrix.hs b/packages/hmatrix/src/Numeric/HMatrix.hs index 36fcf70..fcd3e02 100644 --- a/packages/hmatrix/src/Numeric/HMatrix.hs +++ b/packages/hmatrix/src/Numeric/HMatrix.hs | |||
@@ -129,8 +129,8 @@ module Numeric.HMatrix ( | |||
129 | 129 | ||
130 | import Numeric.HMatrix.Data | 130 | import Numeric.HMatrix.Data |
131 | 131 | ||
132 | import Numeric.Matrix() | 132 | --import Numeric.Matrix() |
133 | import Numeric.Vector() | 133 | --import Numeric.Vector() |
134 | import Numeric.Container | 134 | import Numeric.Container |
135 | import Numeric.LinearAlgebra.Algorithms | 135 | import Numeric.LinearAlgebra.Algorithms |
136 | import Numeric.LinearAlgebra.Util | 136 | import Numeric.LinearAlgebra.Util |
diff --git a/packages/hmatrix/src/Numeric/IO.hs b/packages/hmatrix/src/Numeric/IO.hs index 58fa2b4..08d812b 100644 --- a/packages/hmatrix/src/Numeric/IO.hs +++ b/packages/hmatrix/src/Numeric/IO.hs | |||
@@ -20,128 +20,10 @@ module Numeric.IO ( | |||
20 | ) where | 20 | ) where |
21 | 21 | ||
22 | import Data.Packed | 22 | import Data.Packed |
23 | import Data.Packed.Development | 23 | import Data.Packed.IO |
24 | import System.Process(readProcess) | 24 | import System.Process(readProcess) |
25 | import Text.Printf(printf) | ||
26 | import Data.List(intersperse) | ||
27 | import Data.Complex | ||
28 | import Numeric.GSL.Vector | 25 | import Numeric.GSL.Vector |
29 | 26 | ||
30 | {- | Creates a string from a matrix given a separator and a function to show each entry. Using | ||
31 | this function the user can easily define any desired display function: | ||
32 | |||
33 | @import Text.Printf(printf)@ | ||
34 | |||
35 | @disp = putStr . format \" \" (printf \"%.2f\")@ | ||
36 | |||
37 | -} | ||
38 | format :: (Element t) => String -> (t -> String) -> Matrix t -> String | ||
39 | format sep f m = table sep . map (map f) . toLists $ m | ||
40 | |||
41 | {- | Show a matrix with \"autoscaling\" and a given number of decimal places. | ||
42 | |||
43 | >>> putStr . disps 2 $ 120 * (3><4) [1..] | ||
44 | 3x4 E3 | ||
45 | 0.12 0.24 0.36 0.48 | ||
46 | 0.60 0.72 0.84 0.96 | ||
47 | 1.08 1.20 1.32 1.44 | ||
48 | |||
49 | -} | ||
50 | disps :: Int -> Matrix Double -> String | ||
51 | disps d x = sdims x ++ " " ++ formatScaled d x | ||
52 | |||
53 | {- | Show a matrix with a given number of decimal places. | ||
54 | |||
55 | >>> dispf 2 (1/3 + ident 3) | ||
56 | "3x3\n1.33 0.33 0.33\n0.33 1.33 0.33\n0.33 0.33 1.33\n" | ||
57 | |||
58 | >>> putStr . dispf 2 $ (3><4)[1,1.5..] | ||
59 | 3x4 | ||
60 | 1.00 1.50 2.00 2.50 | ||
61 | 3.00 3.50 4.00 4.50 | ||
62 | 5.00 5.50 6.00 6.50 | ||
63 | |||
64 | >>> putStr . unlines . tail . lines . dispf 2 . asRow $ linspace 10 (0,1) | ||
65 | 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 | ||
66 | |||
67 | -} | ||
68 | dispf :: Int -> Matrix Double -> String | ||
69 | dispf d x = sdims x ++ "\n" ++ formatFixed (if isInt x then 0 else d) x | ||
70 | |||
71 | sdims x = show (rows x) ++ "x" ++ show (cols x) | ||
72 | |||
73 | formatFixed d x = format " " (printf ("%."++show d++"f")) $ x | ||
74 | |||
75 | isInt = all lookslikeInt . toList . flatten | ||
76 | |||
77 | formatScaled dec t = "E"++show o++"\n" ++ ss | ||
78 | where ss = format " " (printf fmt. g) t | ||
79 | g x | o >= 0 = x/10^(o::Int) | ||
80 | | otherwise = x*10^(-o) | ||
81 | o | rows t == 0 || cols t == 0 = 0 | ||
82 | | otherwise = floor $ maximum $ map (logBase 10 . abs) $ toList $ flatten t | ||
83 | fmt = '%':show (dec+3) ++ '.':show dec ++"f" | ||
84 | |||
85 | {- | Show a vector using a function for showing matrices. | ||
86 | |||
87 | >>> putStr . vecdisp (dispf 2) $ linspace 10 (0,1) | ||
88 | 10 |> 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 | ||
89 | |||
90 | -} | ||
91 | vecdisp :: (Element t) => (Matrix t -> String) -> Vector t -> String | ||
92 | vecdisp f v | ||
93 | = ((show (dim v) ++ " |> ") ++) . (++"\n") | ||
94 | . unwords . lines . tail . dropWhile (not . (`elem` " \n")) | ||
95 | . f . trans . reshape 1 | ||
96 | $ v | ||
97 | |||
98 | {- | Tool to display matrices with latex syntax. | ||
99 | |||
100 | >>> latexFormat "bmatrix" (dispf 2 $ ident 2) | ||
101 | "\\begin{bmatrix}\n1 & 0\n\\\\\n0 & 1\n\\end{bmatrix}" | ||
102 | |||
103 | -} | ||
104 | latexFormat :: String -- ^ type of braces: \"matrix\", \"bmatrix\", \"pmatrix\", etc. | ||
105 | -> String -- ^ Formatted matrix, with elements separated by spaces and newlines | ||
106 | -> String | ||
107 | latexFormat del tab = "\\begin{"++del++"}\n" ++ f tab ++ "\\end{"++del++"}" | ||
108 | where f = unlines . intersperse "\\\\" . map unwords . map (intersperse " & " . words) . tail . lines | ||
109 | |||
110 | -- | Pretty print a complex number with at most n decimal digits. | ||
111 | showComplex :: Int -> Complex Double -> String | ||
112 | showComplex d (a:+b) | ||
113 | | isZero a && isZero b = "0" | ||
114 | | isZero b = sa | ||
115 | | isZero a && isOne b = s2++"i" | ||
116 | | isZero a = sb++"i" | ||
117 | | isOne b = sa++s3++"i" | ||
118 | | otherwise = sa++s1++sb++"i" | ||
119 | where | ||
120 | sa = shcr d a | ||
121 | sb = shcr d b | ||
122 | s1 = if b<0 then "" else "+" | ||
123 | s2 = if b<0 then "-" else "" | ||
124 | s3 = if b<0 then "-" else "+" | ||
125 | |||
126 | shcr d a | lookslikeInt a = printf "%.0f" a | ||
127 | | otherwise = printf ("%."++show d++"f") a | ||
128 | |||
129 | |||
130 | lookslikeInt x = show (round x :: Int) ++".0" == shx || "-0.0" == shx | ||
131 | where shx = show x | ||
132 | |||
133 | isZero x = show x `elem` ["0.0","-0.0"] | ||
134 | isOne x = show x `elem` ["1.0","-1.0"] | ||
135 | |||
136 | -- | Pretty print a complex matrix with at most n decimal digits. | ||
137 | dispcf :: Int -> Matrix (Complex Double) -> String | ||
138 | dispcf d m = sdims m ++ "\n" ++ format " " (showComplex d) m | ||
139 | |||
140 | -------------------------------------------------------------------- | ||
141 | |||
142 | -- | reads a matrix from a string containing a table of numbers. | ||
143 | readMatrix :: String -> Matrix Double | ||
144 | readMatrix = fromLists . map (map read). map words . filter (not.null) . lines | ||
145 | 27 | ||
146 | {- | obtains the number of rows and columns in an ASCII data file | 28 | {- | obtains the number of rows and columns in an ASCII data file |
147 | (provisionally using unix's wc). | 29 | (provisionally using unix's wc). |
diff --git a/packages/hmatrix/src/Numeric/Random.hs b/packages/hmatrix/src/Numeric/Random.hs index 7bf9e8b..0e722fd 100644 --- a/packages/hmatrix/src/Numeric/Random.hs +++ b/packages/hmatrix/src/Numeric/Random.hs | |||
@@ -21,8 +21,7 @@ module Numeric.Random ( | |||
21 | ) where | 21 | ) where |
22 | 22 | ||
23 | import Numeric.GSL.Vector | 23 | import Numeric.GSL.Vector |
24 | import Data.Packed | 24 | import Numeric.Container |
25 | import Data.Packed.Numeric | ||
26 | import Numeric.LinearAlgebra.Algorithms | 25 | import Numeric.LinearAlgebra.Algorithms |
27 | import System.Random(randomIO) | 26 | import System.Random(randomIO) |
28 | 27 | ||