Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 27451 invoked from network); 18 Feb 2011 10:44:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2011 10:44:03 -0000 Received: (qmail 6002 invoked by uid 500); 18 Feb 2011 10:44:03 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 5593 invoked by uid 500); 18 Feb 2011 10:44:00 -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 5581 invoked by uid 99); 18 Feb 2011 10:43:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 10:43:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 10:43:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A00CC19BA06 for ; Fri, 18 Feb 2011 10:43:38 +0000 (UTC) Date: Fri, 18 Feb 2011 10:43:38 +0000 (UTC) From: "Gilles (JIRA)" To: issues@commons.apache.org Message-ID: <740371602.227.1298025818652.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <386021937.17232.1297763877648.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (MATH-512) "GaussianFitter" could inherit from "CurveFitter" 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-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996336#comment-12996336 ] Gilles commented on MATH-512: ----------------------------- {quote} I already submitted the second patch earlier today. {quote} I know, and I looked at it; but it still contains many formatting errors ("tab" characters, trailing white space, "{" characters on their own line). The first two kinds of errors are detected by "CheckStyle"; you can generate the report by running the following command: {noformat} $ mvn site {noformat} and the html report will be located in the file {noformat} target/site/checkstyle.html {noformat} For the third kind, you'll probably have to review the code manually. I think that it is better to correct as many problems as possible before committing any changes. Even so, some will remain, but the fewer, the better, especially for those who clean-up afterwards ;-). [By the way, I think that the name of the inner class "GaussianParametersGuesser" could be shortened to maybe "ParameterGuesser".] > "GaussianFitter" could inherit from "CurveFitter" > ------------------------------------------------- > > Key: MATH-512 > URL: https://issues.apache.org/jira/browse/MATH-512 > Project: Commons Math > Issue Type: Improvement > Reporter: Gilles > Priority: Minor > Fix For: 3.0 > > Attachments: GaussianFitter.patch, GaussianFitter.patch, GaussianFitterTest.patch, ParametricGaussianFunctionTest.patch > > > Currently, the "GaussianFitter" class contains a "CurveFitter" instance (and delegates most method calls to it) for the sake of being able to return a "GaussianFunction" instance (from the call to the "fit" method). > I think that it would clearer (in the context of the "fitting" package) that "fit" returns an array of doubles (as "CurveFitter" does). The user can then easily create a "Gaussian" function object, if needed. > [Also, note that the "GaussianFitter" actually fits the sum of a constant and a Gaussian function; thus the name is slightly misleading IMO.] > I also think that "ParametricGaussianFunction" and "GaussianParametersGuesser" should become inner classes of "GaussianFitter" (as this makes it clear what their use is). -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira