summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Vector.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-01-14 13:17:44 +0000
committerAlberto Ruiz <aruiz@um.es>2010-01-14 13:17:44 +0000
commitb8b9e8a91b51e6689a071dbc05f3da857c762e0d (patch)
tree0db5532668c77a7934dd181195aeb84c9f22ddc2 /lib/Data/Packed/Vector.hs
parentdfd2cb93e1f6c9fe42ddfd6775ecd1ab7c980ccf (diff)
dispf, disps
Diffstat (limited to 'lib/Data/Packed/Vector.hs')
-rw-r--r--lib/Data/Packed/Vector.hs4
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)
345 |> [-3.0,-0.5,2.0,4.5,7.0]@ 345 |> [-3.0,-0.5,2.0,4.5,7.0]@
35
36Logarithmic spacing can be defined as follows:
37
38@logspace n (a,b) = 10 ** linspace n (a,b)@
35-} 39-}
36linspace :: Int -> (Double, Double) -> Vector Double 40linspace :: Int -> (Double, Double) -> Vector Double
37linspace n (a,b) = add a $ scale s $ fromList [0 .. fromIntegral n-1] 41linspace n (a,b) = add a $ scale s $ fromList [0 .. fromIntegral n-1]