I feel like it belongs in a separate class in utils.
Ajo
On Tue, Aug 20, 2013 at 12:24 PM, Phil Steitz <phil.steitz@gmail.com> wrote:
> On 8/20/13 12:09 PM, Ajo Fod wrote:
> > I think it belongs in stat.inference. That is where all the tests are.
>
> Sorry, I should have been more clear. I intend to put
> KolmogorovSmirnovTest in stat.inference. I agree it belongs there.
> What I am puzzling over is where to put the combinations iterator.
>
> Phil
> >
> > Ajo
> >
> >
> > On Tue, Aug 20, 2013 at 8:51 AM, Phil Steitz <phil.steitz@gmail.com>
> wrote:
> >
> >> The monte carlo approach I developed for 2sample KolmogorovSmirnov
> >> tests converges too slowly to be practical. I suspect full
> >> enumeration of n  m partitions of n + m will actually be faster for
> >> small m + n. To do this, I need to enumerate combinations. I have
> >> implemented a fast, nonrecursive algorithm to do this (Knuth's
> >> algorithm T from 7.2.1.3 of TACP 4A), exposed as
> >>
> >> class LexicographicCombinationIterator implements Iterator<int[]>
> >>
> >> The constructor takes <n, k> and the int[] arrays returned by next()
> >> are increasing klength arrays from {0, ..., n  1}, iterated in
> >> lexicographic order. The arraybased approach is what I need in KS
> >> and also fastest.
> >>
> >> Initially, I implemented this as a private inner class in
> >> KolmogorovSmirnovTest, but this is making testing inconvenient and
> >> it also seems like a generically useful class. The question is
> >> where to put it. One possibility is to make it a public inner class
> >> of MathArrays. Of just add it as a class in util. Advice appreciated.
> >>
> >> Phil
> >>
> >> 
> >> To unsubscribe, email: devunsubscribe@commons.apache.org
> >> For additional commands, email: devhelp@commons.apache.org
> >>
> >>
>
>
> 
> To unsubscribe, email: devunsubscribe@commons.apache.org
> For additional commands, email: devhelp@commons.apache.org
>
>
