HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerandom-fu-0.3.0.1Haskell2010

Data.Random.Distribution.Triangular

  • 1 type
  • 2 values
  • Packagerandom-fu-0.3.0.1
  • Exports3
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceTriangular.hs
datadata Triangular a
#

A description of a triangular distribution - a distribution whose PDF is a triangle ramping up from a lower bound to a specified midpoint and back down to the upper bound. This is a very simple distribution that does not generally occur naturally but is used sometimes as an estimate of a true distribution when only the range of the values and an approximate mode of the true distribution are known.

Constructors

  • Triangular
    • triLower :: a

      The lower bound of the triangle in the PDF (the smallest number the distribution can generate)

    • triMid :: a

      The midpoint of the triangle (also the mode of the distribution)

    • triUpper :: a

      The upper bound of the triangle (and the largest number the distribution can generate)

Instances4CDF, Distribution, Eq, Show