diff options
author | Alberto Ruiz <aruiz@um.es> | 2010-01-14 13:17:44 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2010-01-14 13:17:44 +0000 |
commit | b8b9e8a91b51e6689a071dbc05f3da857c762e0d (patch) | |
tree | 0db5532668c77a7934dd181195aeb84c9f22ddc2 /lib/Data/Packed/Vector.hs | |
parent | dfd2cb93e1f6c9fe42ddfd6775ecd1ab7c980ccf (diff) |
dispf, disps
Diffstat (limited to 'lib/Data/Packed/Vector.hs')
-rw-r--r-- | lib/Data/Packed/Vector.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Data/Packed/Vector.hs b/lib/Data/Packed/Vector.hs index 457da71..ed0e49c 100644 --- a/lib/Data/Packed/Vector.hs +++ b/lib/Data/Packed/Vector.hs | |||
@@ -32,6 +32,10 @@ import Numeric.GSL.Vector | |||
32 | 32 | ||
33 | @\> linspace 5 (-3,7) | 33 | @\> linspace 5 (-3,7) |
34 | 5 |> [-3.0,-0.5,2.0,4.5,7.0]@ | 34 | 5 |> [-3.0,-0.5,2.0,4.5,7.0]@ |
35 | |||
36 | Logarithmic spacing can be defined as follows: | ||
37 | |||
38 | @logspace n (a,b) = 10 ** linspace n (a,b)@ | ||
35 | -} | 39 | -} |
36 | linspace :: Int -> (Double, Double) -> Vector Double | 40 | linspace :: Int -> (Double, Double) -> Vector Double |
37 | linspace n (a,b) = add a $ scale s $ fromList [0 .. fromIntegral n-1] | 41 | linspace n (a,b) = add a $ scale s $ fromList [0 .. fromIntegral n-1] |