diff options
author | Alberto Ruiz <aruiz@um.es> | 2010-09-11 11:10:33 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2010-09-11 11:10:33 +0000 |
commit | 6859c5712a85950b5bc3de3fe8352f4592bc273b (patch) | |
tree | de9008ebc9c25792237b4df5a4aa8e60057cf55a /examples/Real.hs | |
parent | 84a5ee4fb1b2185eabf64b761279b4da313bd207 (diff) |
added generic konst
Diffstat (limited to 'examples/Real.hs')
-rw-r--r-- | examples/Real.hs | 4 |
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 | |||
67 | zeros :: Int -- ^ rows | 67 | zeros :: Int -- ^ rows |
68 | -> Int -- ^ columns | 68 | -> Int -- ^ columns |
69 | -> Matrix Double | 69 | -> Matrix Double |
70 | zeros r c = reshape c (constant 0 (r*c)) | 70 | zeros r c = konst 0 (r,c) |
71 | 71 | ||
72 | -- | Create a matrix or ones. | 72 | -- | Create a matrix or ones. |
73 | ones :: Int -- ^ rows | 73 | ones :: Int -- ^ rows |
74 | -> Int -- ^ columns | 74 | -> Int -- ^ columns |
75 | -> Matrix Double | 75 | -> Matrix Double |
76 | ones r c = reshape c (constant 1 (r*c)) | 76 | ones r c = konst 1 (r,c) |
77 | 77 | ||
78 | -- | Concatenation of real vectors. | 78 | -- | Concatenation of real vectors. |
79 | infixl 9 # | 79 | infixl 9 # |