commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject [Math] About MATH-798
Date Fri, 01 Jun 2012 15:43:34 GMT

I think that "PolynomialFitter" class deserves to be deleted.

It looks like a bad use of inheritance because it cannot prevent bad usage
of its base class's "fit" methods (where a user can provide a parametric
function argument that is not a polynomial).

Issue 798 could be solved by providing the methods with the "maxEval" and
"initialGuess" arguments but this would not solve the above problem.

The alternative would be to use composition (i.e. have "CurveFitter" an
instance variable of "PolynomialFitter") but this would mean to duplicate
all the methods of "CurveFitter".
I don't think that it is reasonable; all that would gained is saving the
typing of
  new PolynomialFunction.Parametric()
in the call to the "fit" method (from "CurveFitter").

I propose do deprecate "PolynomialFitter" in 3.1, and remove it in 4.0.

[The fitting of a polynomial using a "CurveFitter" directly could be
described in the userguide.]


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

View raw message