commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <gil...@harfang.homelinux.org>
Subject [Math] "KolmogorovSmirnovTest" cleanup
Date Fri, 11 Mar 2016 13:40:40 GMT
Hi.

There are deprecated fields and constructor in the 
"KolmogorovSmirnovTest"
class (in package "o.a.c.m.stat.inference"):

  * protected static final int SMALL_SAMPLE_PRODUCT
  * protected static final int MONTE_CARLO_ITERATIONS
  * public KolmogorovSmirnovTest(RandomGenerator rng)

In particular the Javadoc for the latter indicates:
"The #monteCarloP(double, int, int, boolean, int) that uses the 
generator
supplied to this constructor is deprecated as of version 3.6."

But the public method "monteCarloP" is _not_ annotated as deprecated, 
and
neither is the field

  * private final RandomGenerator rng

although its Javadoc says:
"Random data generator used by {@link #monteCarloP(double, int, int, 
boolean, int)}"

I found this related issue still open in JIRA:
  https://issues.apache.org/jira/browse/MATH-1179

Thus, can we effectively delete the "monteCarloP" method and all the 
"private"
methods which it calls?
Should I open a specific issue for this action, or can I use MATH-1179 
?

Alternatively, isn't the Monte-Carlo option a feature worth keeping?
If there are several ways to obtain a result, shouldn't we implement 
them
in separate classes (cf. "Strategy" pattern advertized in CM's 
"proposal"
document)? [That would certainly help cleaning up to have smaller bits 
of
code: "KolmogorovSmirnovTest" is 1200+ lines long.]


Regards,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message