From ef7283f6254422204c8f68c4cdde0094003e127f Mon Sep 17 00:00:00 2001 From: Patrik Jansson Date: Wed, 28 Oct 2015 22:00:21 +0100 Subject: Following through the change of type in meanCov to the test and to gaussianSamle. Not tested. --- packages/gsl/src/Numeric/GSL/Random.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/gsl/src/Numeric') diff --git a/packages/gsl/src/Numeric/GSL/Random.hs b/packages/gsl/src/Numeric/GSL/Random.hs index 139c921..aad9ad9 100644 --- a/packages/gsl/src/Numeric/GSL/Random.hs +++ b/packages/gsl/src/Numeric/GSL/Random.hs @@ -39,13 +39,13 @@ type Seed = Int gaussianSample :: Seed -> Int -- ^ number of rows -> Vector Double -- ^ mean vector - -> Matrix Double -- ^ covariance matrix + -> Herm Double -- ^ covariance matrix -> Matrix Double -- ^ result gaussianSample seed n med cov = m where c = size med meds = konst 1 n `outer` med rs = reshape c $ randomVector seed Gaussian (c * n) - m = rs <> cholSH cov + meds + m = rs <> chol cov + meds -- | Obtains a matrix whose rows are pseudorandom samples from a multivariate -- uniform distribution. @@ -87,4 +87,3 @@ rand = randm Uniform -} randn :: Int -> Int -> IO (Matrix Double) randn = randm Gaussian - -- cgit v1.2.3