Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98B05B419 for ; Mon, 2 Jan 2012 22:59:46 +0000 (UTC) Received: (qmail 45644 invoked by uid 500); 2 Jan 2012 22:59:45 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 45534 invoked by uid 500); 2 Jan 2012 22:59:45 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 45526 invoked by uid 99); 2 Jan 2012 22:59:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jan 2012 22:59:45 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of halcyon1981@gmail.com designates 209.85.215.171 as permitted sender) Received: from [209.85.215.171] (HELO mail-ey0-f171.google.com) (209.85.215.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jan 2012 22:59:40 +0000 Received: by eaad11 with SMTP id d11so53994187eaa.30 for ; Mon, 02 Jan 2012 14:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=7Dt85Wr3IxLTuPAwHPl4oBT+IHEXc1Tu23ewSr9jNLM=; b=vvuzOJlgr5rGjMSNpDaZh96EjkFclXuYTe7DTP0lHjhf6vlUQA+lBcWSapZ4uCoICI PmJavRHeWTHftL/srWLDEdQY2rAj1R1+puDgYHYcHHUHNM951cOjxEryrjRgZBWZQZgA 8ajdMq6AbQjeCDvZOcylTjh8PbYKvfQDWImxE= MIME-Version: 1.0 Received: by 10.204.153.211 with SMTP id l19mr6945147bkw.24.1325545158960; Mon, 02 Jan 2012 14:59:18 -0800 (PST) Received: by 10.204.195.74 with HTTP; Mon, 2 Jan 2012 14:59:18 -0800 (PST) Date: Mon, 2 Jan 2012 14:59:18 -0800 Message-ID: Subject: [math] Help understanding lower/upper/initialDomain in AbstractContinuousDistribution From: David Erickson To: dev@commons.apache.org Content-Type: text/plain; charset=ISO-8859-1 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 (http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution). I've created a new class GeneralizedExtremeValueDistributionImpl that extends AbstractContinuousDistribution and implements cumulativeProbability: @Override 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, -(x-mu)/sigma)); } } 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. Thanks, David --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org