diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-22 20:49:31 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-22 20:49:31 +0200 |
commit | 109fa7d25779e331356bbe310755c10eddfeb235 (patch) | |
tree | a1454e096de099384e8b575019d045e16999a72e /packages/gsl | |
parent | 85af0a1d5ba2d1c03f05458f9689195e82f6ae7e (diff) |
remove compat
Diffstat (limited to 'packages/gsl')
-rw-r--r-- | packages/gsl/src/Numeric/GSL/Random.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/gsl/src/Numeric/GSL/Random.hs b/packages/gsl/src/Numeric/GSL/Random.hs index 2594d27..07fa64d 100644 --- a/packages/gsl/src/Numeric/GSL/Random.hs +++ b/packages/gsl/src/Numeric/GSL/Random.hs | |||
@@ -41,7 +41,7 @@ gaussianSample :: Seed | |||
41 | -> Matrix Double -- ^ result | 41 | -> Matrix Double -- ^ result |
42 | gaussianSample seed n med cov = m where | 42 | gaussianSample seed n med cov = m where |
43 | c = dim med | 43 | c = dim med |
44 | meds = konst' 1 n `outer` med | 44 | meds = konst 1 n `outer` med |
45 | rs = reshape c $ randomVector seed Gaussian (c * n) | 45 | rs = reshape c $ randomVector seed Gaussian (c * n) |
46 | m = rs `mXm` cholSH cov `add` meds | 46 | m = rs `mXm` cholSH cov `add` meds |
47 | 47 | ||
@@ -57,7 +57,7 @@ uniformSample seed n rgs = m where | |||
57 | cs = zipWith subtract as bs | 57 | cs = zipWith subtract as bs |
58 | d = dim a | 58 | d = dim a |
59 | dat = toRows $ reshape n $ randomVector seed Uniform (n*d) | 59 | dat = toRows $ reshape n $ randomVector seed Uniform (n*d) |
60 | am = konst' 1 n `outer` a | 60 | am = konst 1 n `outer` a |
61 | m = fromColumns (zipWith scale cs dat) `add` am | 61 | m = fromColumns (zipWith scale cs dat) `add` am |
62 | 62 | ||
63 | -- | pseudorandom matrix with uniform elements between 0 and 1 | 63 | -- | pseudorandom matrix with uniform elements between 0 and 1 |