commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Created] (MATH-804) Make "CurveFitter" a generic class
Date Sun, 10 Jun 2012 13:28:43 GMT
Gilles created MATH-804:

             Summary: Make "CurveFitter" a generic class
                 Key: MATH-804
             Project: Commons Math
          Issue Type: Improvement
            Reporter: Gilles
            Assignee: Gilles
            Priority: Trivial
             Fix For: 3.1

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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message