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 D96149537 for ; Sun, 5 Feb 2012 19:14:50 +0000 (UTC) Received: (qmail 1368 invoked by uid 500); 5 Feb 2012 19:14:50 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 1167 invoked by uid 500); 5 Feb 2012 19:14:49 -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 1158 invoked by uid 99); 5 Feb 2012 19:14:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 19:14:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.26] (HELO hel.is.scarlet.be) (193.74.71.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 19:14:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1328469261; bh=t0z4o6MvAkRvPM7u6NPVxx/stVWuO3tfZ5DRnDeuKwM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=2+Zy52w1bYmpdfzxXQokFNxzigsqKFgomDXfvoSPDy2/8wNHQRjWVQPi+NsEnBvS3 UmYv+Vff3Df+HJX5MVFtehKiS3Hkm4vs1r097vBOYPYT10Fc5JEpMX12oyO1mU/NNZ nzUjeLU4f11k2yXVD58z3zSH5h4fXKpHdx0U1jOE= Received: from mail.harfang.homelinux.org (ip-213-49-236-110.dsl.scarlet.be [213.49.236.110]) by hel.is.scarlet.be (8.14.5/8.14.5) with ESMTP id q15JEKOf031583 for ; Sun, 5 Feb 2012 20:14:21 +0100 X-Scarlet: d=1328469261 c=213.49.236.110 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 152016182F for ; Sun, 5 Feb 2012 20:14:20 +0100 (CET) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id OMxrX8XFgliw for ; Sun, 5 Feb 2012 20:14:15 +0100 (CET) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id A8F2B6176F for ; Sun, 5 Feb 2012 20:14:15 +0100 (CET) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.77) (envelope-from ) id 1Ru7XT-0006gZ-Aw for dev@commons.apache.org; Sun, 05 Feb 2012 20:14:15 +0100 Date: Sun, 5 Feb 2012 20:14:14 +0100 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [math] Merge of interface and implementation of *Test classes in stat.inference Message-ID: <20120205191414.GV12351@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <4F2C3698.4010807@gmail.com> <20120203213324.GU12351@dusk.harfang.homelinux.org> <4F2ECA71.7020205@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F2ECA71.7020205@gmail.com> X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: hel 20001; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at hel X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Feb 05, 2012 at 07:29:05PM +0100, Thomas Neidhart wrote: > On 02/03/2012 10:33 PM, Gilles Sadowski wrote: > > On Fri, Feb 03, 2012 at 08:33:44PM +0100, Thomas Neidhart wrote: > >> Hi, > >> > >> I have been working on the exceptions in the stat.inference package and > >> have seen that all classes in this package follow the same scheme: > >> > >> - Interface for a statistical test > >> - Implementation of this single interface > >> > >> e.g. > >> > >> ChiSquareTest > >> ChiSquareTestImpl > >> > >> There was some effort in other packages, e.g. distribution to merge such > >> constructs, and was wondering if not the same should apply here. > >> > >> I do not see an immediate benefit of having separate interface and > >> implementation for a single Test, especially as there is no base Test > >> interface. > > Actually I would even go further, and change all the provided methods to > static functions as this is the way they are actually used via the > utility class TestUtils (see also the tutorial about Statistics). > > TestUtils provides utility methods for each test. Therefore it > instantiates each Test once and calls the corresponding methods. As all > these tests are stateless, i.e. they do not store any data, there is no > real need to do it that way. Maybe I'm mistaken but it seems that you think that the "...Test" classes in package "stat.inference" are somehow utilities for the CM unit tests (as is actually the case for the "TestUtils" class) or some base class for CM unit tests (?). That's not the case. The name "ChiSquareTest" is the name of a "statistic test" (not a unit test for a "ChiSquare" functionality): http://en.wikipedia.org/wiki/Chi-squared_test The class may be used in the CM's unit testing framework but that does not imply that it should be tailored to do just that; it is useful on its own, as any other functionality available in CM. [Sorry if I misunderstood what you were saying; in which case I did not get it...] Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org