commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Erickson <>
Subject [math] Help understanding lower/upper/initialDomain in AbstractContinuousDistribution
Date Mon, 02 Jan 2012 22:59:18 GMT
Hi all-
I'm new to using the Math package but it looks great.  I need a couple
distributions that aren't currently included, one as an example is the
Generalized Extreme Value distribution
 I've created a new class GeneralizedExtremeValueDistributionImpl that
extends AbstractContinuousDistribution and implements

    public double cumulativeProbability(double x) throws MathException {
        if (xi != 0) {
            return -FastMath.pow(FastMath.E, FastMath.pow(1d+xi*((x -
mu)/sigma), -1/xi));
        } else {
            return -FastMath.pow(FastMath.E, FastMath.pow(FastMath.E,

According to the API I also need to implement getInitialDomain,
getDomainLowerBound, getDomainUpperBound, I looked at the existing
docs and other implementations but I'm still unclear on how these are
used, and what I should be returning, particularly since the existing
implementations primarily check if p is < or > .5 and return a
(frequently) static value.  If anyone could help me shed some light on
this I would be very appreciative.  Primarily I just need to use the
distribution to generate RandomVariable values.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message