Accord.Statistics.Distributions.Univariate.InverseGammaDistribution.InverseGammaDistribution C# (CSharp) Method

InverseGammaDistribution() public method

Creates a new Inverse Gamma Distribution.
public InverseGammaDistribution ( [ shape, [ scale ) : System
shape [ The shape parameter α (alpha).
scale [ The scale parameter β (beta).
return System
        public InverseGammaDistribution([Positive] double shape, [Positive] double scale)
        {
            if (shape <= 0)
                throw new ArgumentOutOfRangeException("shape");

            if (scale <= 0)
                throw new ArgumentOutOfRangeException("scale");

            this.a = shape;
            this.b = scale;

            this.constant = Math.Pow(b, a) / Gamma.Function(a);
        }