diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-06-03 21:06:17 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-06-03 21:06:17 +0200 |
commit | 9a17969ad0ea9f940db6201a37b9aed19ad605df (patch) | |
tree | ccbf24f7fdcddc2d248b8deb0ca9b97a18fc94e4 /packages/base/src/Data/Packed | |
parent | 2734dd1ddc6b31aba6377ef969a33967babca519 (diff) |
fix linspace, expose udot, complex static, wip
Diffstat (limited to 'packages/base/src/Data/Packed')
-rw-r--r-- | packages/base/src/Data/Packed/Numeric.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs index e324ab6..e90c612 100644 --- a/packages/base/src/Data/Packed/Numeric.hs +++ b/packages/base/src/Data/Packed/Numeric.hs | |||
@@ -90,7 +90,8 @@ Logarithmic spacing can be defined as follows: | |||
90 | @logspace n (a,b) = 10 ** linspace n (a,b)@ | 90 | @logspace n (a,b) = 10 ** linspace n (a,b)@ |
91 | -} | 91 | -} |
92 | linspace :: (Container Vector e) => Int -> (e, e) -> Vector e | 92 | linspace :: (Container Vector e) => Int -> (e, e) -> Vector e |
93 | linspace 0 (a,b) = fromList[(a+b)/2] | 93 | linspace 0 _ = fromList[] |
94 | linspace 1 (a,b) = fromList[(a+b)/2] | ||
94 | linspace n (a,b) = addConstant a $ scale s $ fromList $ map fromIntegral [0 .. n-1] | 95 | linspace n (a,b) = addConstant a $ scale s $ fromList $ map fromIntegral [0 .. n-1] |
95 | where s = (b-a)/fromIntegral (n-1) | 96 | where s = (b-a)/fromIntegral (n-1) |
96 | 97 | ||