commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [Math] HarmonicFitter and GaussianFitter
Date Sat, 09 Jun 2012 20:19:53 GMT
Hello.

> > [...]
> >>
> >> Then, we could keep "PolynomialFitter".
> >>
> >>
> >> OK for this change?
> >
> > OK.
> >
> > Luc
> >
> Sounds good to me!


Could you please have a look at "PolynomialFitter"? I'm not sure that it is
useful to select the degree of the polynomial at construction, as it is
currently done. Is there a reason?

I'd rather create a new "fit" method:

  public double fit(double[] guess) {
    return fit(new PolynomialFunction.Parametric(), guess);
  }

and deduce the degree from the length of the "guess" array:
  degree == guess.length - 1

If so, I'd then deprecate the constructor and the current "fit()" method.


Best,
Gilles

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


Mime
View raw message