summaryrefslogtreecommitdiff
path: root/lib/Data
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-01-18 09:51:31 +0000
committerAlberto Ruiz <aruiz@um.es>2010-01-18 09:51:31 +0000
commit102d6b19beadd76b28d32e1aa40844fad19af756 (patch)
tree1b7736d5d392b0ef43e2e119fc2d1d1a91cd5831 /lib/Data
parent830164c7c34d874aa66754206be956f85456842f (diff)
deprecate .* and */
Diffstat (limited to 'lib/Data')
-rw-r--r--lib/Data/Packed/Random.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Data/Packed/Random.hs b/lib/Data/Packed/Random.hs
index a6145be..fea3cdd 100644
--- a/lib/Data/Packed/Random.hs
+++ b/lib/Data/Packed/Random.hs
@@ -21,6 +21,7 @@ module Data.Packed.Random (
21 21
22import Numeric.GSL.Vector 22import Numeric.GSL.Vector
23import Data.Packed 23import Data.Packed
24import Numeric.LinearAlgebra.Linear
24import Numeric.LinearAlgebra.Algorithms 25import Numeric.LinearAlgebra.Algorithms
25import Numeric.LinearAlgebra.Instances() 26import Numeric.LinearAlgebra.Instances()
26import Numeric.LinearAlgebra.Interface 27import Numeric.LinearAlgebra.Interface
@@ -54,7 +55,7 @@ uniformSample seed n rgs = m where
54 d = dim a 55 d = dim a
55 dat = toRows $ reshape n $ randomVector seed Uniform (n*d) 56 dat = toRows $ reshape n $ randomVector seed Uniform (n*d)
56 am = constant 1 n `outer` a 57 am = constant 1 n `outer` a
57 m = fromColumns (zipWith (.*) cs dat) + am 58 m = fromColumns (zipWith scale cs dat) + am
58 59
59------------ utilities ------------------------------- 60------------ utilities -------------------------------
60 61