19 lines
602 B
Haskell
19 lines
602 B
Haskell
|
-- TestRandomUtils.hs
|
||
|
module TestRandomUtils (tests) where
|
||
|
|
||
|
import RandomUtils (generateUniformPoints, generateNormalPoints)
|
||
|
|
||
|
-- Define your tests here
|
||
|
tests :: IO ()
|
||
|
tests = do
|
||
|
-- Generate 10 random points from a uniform distribution in the range [-1, 1]
|
||
|
uniformPoints <- generateUniformPoints 10 (-1, 1)
|
||
|
putStrLn "Uniform distribution points:"
|
||
|
print uniformPoints
|
||
|
|
||
|
-- Generate 10 random points from a normal distribution using the Box-Muller transform
|
||
|
normalPoints <- generateNormalPoints 10 0 1
|
||
|
putStrLn "Normal distribution points (Box-Muller):"
|
||
|
print normalPoints
|
||
|
|