random-fu-0.2.7.4: Random number generation

Data.Random.Distribution.Simplex

Synopsis

# Documentation

newtype StdSimplex as Source #

Uniform distribution over a standard simplex.

Constructors

 StdSimplex Int StdSimplex k constructs a standard simplex of dimension k (standard k-simplex). An element of the simplex represents a vector variable as = (a_0, a_1, ..., a_k). The elements of as are more than or equal to 0 and sum as is always equal to 1.
Instances
 Source # Instance detailsDefined in Data.Random.Distribution.Simplex Methodsrvar :: StdSimplex [a] -> RVar [a] Source #rvarT :: StdSimplex [a] -> RVarT n [a] Source # Eq (StdSimplex as) Source # Instance detailsDefined in Data.Random.Distribution.Simplex Methods(==) :: StdSimplex as -> StdSimplex as -> Bool #(/=) :: StdSimplex as -> StdSimplex as -> Bool # Show (StdSimplex as) Source # Instance detailsDefined in Data.Random.Distribution.Simplex MethodsshowsPrec :: Int -> StdSimplex as -> ShowS #show :: StdSimplex as -> String #showList :: [StdSimplex as] -> ShowS #

stdSimplex :: Distribution StdSimplex [a] => Int -> RVar [a] Source #

stdSimplex k returns a random variable being uniformly distributed over a standard simplex of dimension k.

fractionalStdSimplex :: (Ord a, Fractional a, Distribution StdUniform a) => Int -> RVar [a] Source #

An algorithm proposed by Rubinstein & Melamed (1998). See, e.g., S. Onn, I. Weissman. Generating uniform random vectors over a simplex with implications to the volume of a certain polytope and to multivariate extremes. Ann Oper Res (2011) 189:331-342.