summaryrefslogtreecommitdiff
path: root/packages/gsl
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-22 20:49:31 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-22 20:49:31 +0200
commit109fa7d25779e331356bbe310755c10eddfeb235 (patch)
treea1454e096de099384e8b575019d045e16999a72e /packages/gsl
parent85af0a1d5ba2d1c03f05458f9689195e82f6ae7e (diff)
remove compat
Diffstat (limited to 'packages/gsl')
-rw-r--r--packages/gsl/src/Numeric/GSL/Random.hs4
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
42gaussianSample seed n med cov = m where 42gaussianSample 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