gev-lib 0.1.0.0 → 0.2.0.0
raw patch · 5 files changed
+5/−15 lines, 5 files
Files
- gev-lib.cabal +5/−3
- src/Gev/Frechet.hs +0/−3
- src/Gev/GevDist.hs +0/−3
- src/Gev/Gumbel.hs +0/−3
- src/Gev/Weibull.hs +0/−3
gev-lib.cabal view
@@ -1,10 +1,12 @@ cabal-version: 2.4 name: gev-lib-version: 0.1.0.0+version: 0.2.0.0 -- A short (one-line) description of the package. synopsis: The family of Extreme Value Distributions. +homepage: https://github.com/HaeckGabriel/gev-lib-Haskell+ -- A longer description of the package. description: Basic Distributional quantities (CDF, PDF, Quantile) for the Gumbel, Féchet, Weibull and GEV Distributions. @@ -22,7 +24,7 @@ -- A copyright notice. -- copyright:-category: Statistics+category: Statistics, Probability extra-source-files: CHANGELOG.md library gev-dist@@ -33,7 +35,7 @@ -- LANGUAGE extensions used by modules in this package. -- other-extensions:- build-depends: base ^>=4.14.3.0, random+ build-depends: base ^>=4.14.3.0, random >= 1.2.1 && < 1.3 hs-source-dirs: src default-language: Haskell2010
src/Gev/Frechet.hs view
@@ -60,13 +60,10 @@ -- Quantile function of the Frechet Distribution quantileFrechet :: FrechetDistribution -> Double -> Double quantileFrechet (Frechet loc sc sh) x- | x == 0 = -inf- | x == 1 = inf | x > 0 && x < 1 = loc + sc * (logexp ** pow) | otherwise = error $ "Gev.FrechetDistribution.quantile: The given value must be between 0 and 1, got: " ++ show x where - inf = 1 / 0 logexp = - log x pow = - 1 / sh
src/Gev/GevDist.hs view
@@ -80,13 +80,10 @@ -- Quantile function of the Frechet Distribution quantileGEV :: GevDistribution -> Double -> Double quantileGEV (GEV loc sc sh) x- | x == 0 = -inf- | x == 1 = inf | x > 0 && x < 1 = if sh == 0 then one else two | otherwise = error $ "Gev.GEVDist.quantile: The given value must be between 0 and 1, got: " ++ show x where - inf = 1 / 0 logx = - log x one = - sc * log logx + loc const = sc / sh
src/Gev/Gumbel.hs view
@@ -54,12 +54,9 @@ quantileGumbel :: GumbelDistribution -> Double -> Double quantileGumbel (Gumbel loc sc) x- | x == 0 = -inf- | x == 1 = inf | x > 0 && x < 1 = loc - sc * (log $ - log x) | otherwise = error $ "Gev.GumbelDistribution.quantile: The given value must be between 0 and 1, got: " ++ show x- where inf = 1 / 0 -- | Gev.Distribution instance implementation for the Gumbel Distribution instance Gev.Distribution GumbelDistribution where
src/Gev/Weibull.hs view
@@ -56,13 +56,10 @@ quantileWeibull :: WeibullDistribution -> Double -> Double quantileWeibull (Weibull loc sc sh) x- | x == 0 = -inf- | x == 1 = inf | x > 0 && x < 1 = loc - sc * (logexp ** pow) | otherwise = error $ "Gev.WeibullDistribution.quantile: The given value must be between 0 and 1, got: " ++ show x where- inf = 1 / 0 logexp = - log x pow = 1 / sh