summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Vector.hs
diff options
context:
space:
mode:
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]