From de0219353ca9631135a3f750cef05b9636bef232 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 24 Apr 2014 13:17:55 +0200 Subject: konst with bidirectional type inference --- lib/Data/Packed/Random.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Data') diff --git a/lib/Data/Packed/Random.hs b/lib/Data/Packed/Random.hs index dabb17d..e8b0268 100644 --- a/lib/Data/Packed/Random.hs +++ b/lib/Data/Packed/Random.hs @@ -36,7 +36,7 @@ gaussianSample :: Seed -> Matrix Double -- ^ result gaussianSample seed n med cov = m where c = dim med - meds = konst 1 n `outer` med + meds = konst' 1 n `outer` med rs = reshape c $ randomVector seed Gaussian (c * n) m = rs `mXm` cholSH cov `add` meds @@ -52,6 +52,6 @@ uniformSample seed n rgs = m where cs = zipWith subtract as bs d = dim a dat = toRows $ reshape n $ randomVector seed Uniform (n*d) - am = konst 1 n `outer` a + am = konst' 1 n `outer` a m = fromColumns (zipWith scale cs dat) `add` am -- cgit v1.2.3