public DirichletDistribution(params double[] concentrations)
: base(concentrations.Length)
{
if (concentrations.Length < 2)
throw new DimensionMismatchException("concentrations",
"Concentration length must be greater than 2.");
for (int i = 0; i < concentrations.Length; i++)
if (concentrations[i] <= 0) throw new ArgumentOutOfRangeException("concentrations",
"Concentration parameters must be higher than 0.");
this.alphas = concentrations;
this.constant = 1.0 / Beta.Multinomial(concentrations);
}