Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 80725 invoked from network); 24 Jan 2010 04:59:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2010 04:59:33 -0000 Received: (qmail 88560 invoked by uid 500); 24 Jan 2010 04:59:33 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 88167 invoked by uid 500); 24 Jan 2010 04:59:32 -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 88157 invoked by uid 99); 24 Jan 2010 04:59:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2010 04:59:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of phil.steitz@gmail.com designates 209.85.223.189 as permitted sender) Received: from [209.85.223.189] (HELO mail-iw0-f189.google.com) (209.85.223.189) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2010 04:59:21 +0000 Received: by iwn27 with SMTP id 27so2180835iwn.8 for ; Sat, 23 Jan 2010 20:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=mNPWQLQ7yCbMokY9Acd+gMLkW8jS/+lhah1L9XwdM9Q=; b=JfN4YdtVQ1Ufl8VUPpZu1oHFU/q3fSDT22iDr6ml10dX8wSiuVDoDQe2IlLxHt1+pr bbulmXd0KsZFMLolasCFjEMw34sdQowUGIBQnUhAVhAkTvsKVw2tQYdLUQnbg7tXagCn K4nGo3bVtu8E17rrvD8fD0kz9ouF2bUXvNKx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=PLamFoT5fRUudppPeO8CBmqHgNVvReuo3VfqyuKltjsADgeLe1ixv35XxdErXBDHFj WAl7ytAZOLWOqCUDi46SYpXcF/4ppxs+uItx3cYXpfYRg7zo/XSFQ5Xjw0RKMXe7psUL YdHwV3TZhI/dIcEpBVIpwBDWSVv4l0ysYgEe4= Received: by 10.231.145.132 with SMTP id d4mr1772004ibv.72.1264309140213; Sat, 23 Jan 2010 20:59:00 -0800 (PST) Received: from phil-steitzs-macbook-pro.local (ip98-167-199-137.ph.ph.cox.net [98.167.199.137]) by mx.google.com with ESMTPS id 23sm3546573iwn.11.2010.01.23.20.58.57 (version=SSLv3 cipher=RC4-MD5); Sat, 23 Jan 2010 20:58:58 -0800 (PST) Message-ID: <4B5BD390.3020708@gmail.com> Date: Sat, 23 Jan 2010 23:58:56 -0500 From: Phil Steitz User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Commons Developers List Subject: Re: [MATH] Density functions for all continuous distributions gives rise to re-consider the HasDensity-interface References: <3796c6d51001221120j76cb8045j4e06df4a83e52051@mail.gmail.com> In-Reply-To: <3796c6d51001221120j76cb8045j4e06df4a83e52051@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Mikkel Meyer Andersen wrote: > Dear Community. > > I've just been going through all the continuous distributions in the > MATH-library to check which implemented the HasDensity

-interface. > > Only the F-distribution, t-distribution, Weibull distribution, and > Cauchy distribution didn't implement it, and with MATH-330 > (https://issues.apache.org/jira/browse/MATH-330 - patch for the > F-distribution) and MATH-331 > (https://issues.apache.org/jira/browse/MATH-331 - patches for the > rest) both made by me that should now be corrected. > > This means that now every continuous distribution implements > HasDensity. Wouldn't it then be a good idea to put a double > density(Double x)-method in the ContinuousDistribution-interface? It > would give a lot of advantages, e.g. in regards to dynamic > dispatching. > > What do you think? Great work! I will complete review and commit if someone does not beat me to it. Technically, adding to the ContinuousDistribution interface is a compatibility break, so should wait until 3.0; but if we follow Ted's suggestion of adding a default impl to AbstractContinuousDistribution, the only users actually impacted would be those who have implemented distributions that do not derive from AbstractContinuousDistribution. I wonder how many of these there are. I am +1 on this change, but understand if others are not comfortable with the compatibility break. Phil > > Cheers, Mikkel. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org