commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <>
Subject Re: [math] Merge of interface and implementation of *Test classes in stat.inference
Date Sun, 05 Feb 2012 18:29:05 GMT
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.


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

View raw message