summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-09-11 11:10:33 +0000
committerAlberto Ruiz <aruiz@um.es>2010-09-11 11:10:33 +0000
commit6859c5712a85950b5bc3de3fe8352f4592bc273b (patch)
treede9008ebc9c25792237b4df5a4aa8e60057cf55a /examples
parent84a5ee4fb1b2185eabf64b761279b4da313bd207 (diff)
added generic konst
Diffstat (limited to 'examples')
-rw-r--r--examples/Real.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/Real.hs b/examples/Real.hs
index b32a961..02eba9f 100644
--- a/examples/Real.hs
+++ b/examples/Real.hs
@@ -67,13 +67,13 @@ diagl = diag . vector
67zeros :: Int -- ^ rows 67zeros :: Int -- ^ rows
68 -> Int -- ^ columns 68 -> Int -- ^ columns
69 -> Matrix Double 69 -> Matrix Double
70zeros r c = reshape c (constant 0 (r*c)) 70zeros r c = konst 0 (r,c)
71 71
72-- | Create a matrix or ones. 72-- | Create a matrix or ones.
73ones :: Int -- ^ rows 73ones :: Int -- ^ rows
74 -> Int -- ^ columns 74 -> Int -- ^ columns
75 -> Matrix Double 75 -> Matrix Double
76ones r c = reshape c (constant 1 (r*c)) 76ones r c = konst 1 (r,c)
77 77
78-- | Concatenation of real vectors. 78-- | Concatenation of real vectors.
79infixl 9 # 79infixl 9 #