----- "Gilles Sadowski" <gil...@harfang.homelinux.org> a écrit :

> > [...]
> > >>
> > >> ---CUT---
> > >>    double[] a = new double[] {1, 2, 3};
> > >>    double[] b = new double[] {1, 2, 3, 4, 5};
> > >>    Percentile pA = new Percentile(a);
> > >>    Percentile pB = new Percentile(b);
> > >>
> > >>    double r;
> > >>    r = pA.evaluate(50);
> > >>    r = pB.evaluate(50);
> > >>    r = pA.evaluate(50);
> > >>    r = pB.evaluate(50);
> > >> ---CUT---
> > >>
> > >> That way, later calls can benefit from whatever preprocessing was
> done in
> > >> previous calls.
> > >> The instance will always control all the information needed (e.g.
> after a
> > >> call to an "addValues" method) for the processing without the
> need to rely
> > >> on the user for calling "clearCache" whenever necessary.
> > >>
> > >>
> > >> Gilles
> > > 
> > > +1
> > > I think that is a really good idea and I agree on the points
> made.
> > 
> > This proposal is point 4. It breaks the UnivariateStatistic API and
> it
> > breaks what the user found interesting in this API, i.e. have a
> general
> > statistics framework where one statistic can be replaced by another
> one.
> > 
> > If you read again one of my earlier messages from today, we will
> combine
> > this method (i.e. evaluate without values) and the
> UnivariateStatistics API.
> > 
> > Perhaps we could add these new methods (i.e. addValues and evaluate
> > without values) to UnivariateStatistics, but this can only be done
> on 3.0.
> 
> +1
> 
> Is it urgent to complicate the code? If the API conflicts with a
> necessary
> efficiency improvement, why not postpone the change?

I was trying to help Leanne as 3.0 is not going to be ready soon.
I'm OK with a change in 3.0 as pushing these methods up to the interface is 
really the best solution.

Luc

> 
> 
> Gilles
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org

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

Reply via email to