Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
Description
In order to enhance compile-time robustness, it is proposed to parameterize the "CurveFitter" class with the type of the function to be used for the fit, i.e.:
public class CurveFitter<T extends ParametricUnivariateFunction> { // ... public double[] fit(T f, final double[] initialGuess) { // ... } }
Thus enforcing that instances of subclasses like "PolynomialFitter" defined as
public class PolynomialFitter extends CurveFitter<PolynomialFunction.Parametric> { // ... }
cannot call the "fit" method with a different function argument.
Attachments
Issue Links
- relates to
-
MATH-800 Deprecating "PolynomialFitter"
- Closed