Commits

Aleksey Khudyakov  committed b4acb61 Merge

Merge pull request #33 from kirelagin/master

Add UniformDistribution accessors

  • Participants
  • Parent commits 3519bdd, 4c83091

Comments (0)

Files changed (1)

File Statistics/Distribution/Uniform.hs

 -- Portability : portable
 --
 -- Variate distributed uniformly in the interval.
-module Statistics.Distribution.Uniform (
-    UniformDistribution
-  , uniformDistr
-  ) where
+module Statistics.Distribution.Uniform
+    (
+      UniformDistribution
+    -- * Constructors
+    , uniformDistr
+    -- ** Accessors
+    , uniformA
+    , uniformB
+    ) where
 
 import Data.Typeable (Typeable)
 import qualified Statistics.Distribution as D
 
 
 -- | Uniform distribution
-data UniformDistribution = UniformDistribution {-# UNPACK #-} !Double {-# UNPACK #-} !Double
-                           deriving (Eq,Show,Read,Typeable)
+data UniformDistribution = UniformDistribution {
+      uniformA :: {-# UNPACK #-} !Double
+    , uniformB :: {-# UNPACK #-} !Double
+    } deriving (Eq, Read, Show, Typeable)
 
 -- | Create uniform distribution.
 uniformDistr :: Double -> Double -> UniformDistribution