Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A87D19106 for ; Sun, 10 Jun 2012 15:13:43 +0000 (UTC) Received: (qmail 44804 invoked by uid 500); 10 Jun 2012 15:13:43 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 44735 invoked by uid 500); 10 Jun 2012 15:13:43 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 44727 invoked by uid 99); 10 Jun 2012 15:13:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jun 2012 15:13:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 05FB914035F for ; Sun, 10 Jun 2012 15:13:42 +0000 (UTC) Date: Sun, 10 Jun 2012 15:13:42 +0000 (UTC) From: "Gilles (JIRA)" To: issues@commons.apache.org Message-ID: <1792077525.1337.1339341223026.JavaMail.jiratomcat@issues-vm> In-Reply-To: <21425308.1244.1339334923129.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (MATH-804) Make "CurveFitter" a generic class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292531#comment-13292531 ] Gilles commented on MATH-804: ----------------------------- Changes committed in revision 1348613. > Make "CurveFitter" a generic class > ---------------------------------- > > Key: MATH-804 > URL: https://issues.apache.org/jira/browse/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.: > {code} > public class CurveFitter { > // ... > public double[] fit(T f, final double[] initialGuess) { > // ... > } > } > {code} > Thus enforcing that instances of subclasses like "PolynomialFitter" defined as > {code} > public class PolynomialFitter extends CurveFitter { > // ... > } > {code} > 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira