Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8C9BD859 for ; Fri, 9 Nov 2012 16:40:33 +0000 (UTC) Received: (qmail 42998 invoked by uid 500); 9 Nov 2012 16:40:33 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 42878 invoked by uid 500); 9 Nov 2012 16:40:32 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 42861 invoked by uid 99); 9 Nov 2012 16:40:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2012 16:40:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.74.71.27] (HELO eir.is.scarlet.be) (193.74.71.27) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2012 16:40:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1352479203; bh=KfZkpDF9EcD9A/Fdxu+f/qy04ytFgi2U4kKoLrwULEY=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=hhjRx5L1jcronVIlTldr2gsBKrA4mwnE2Te1OEmtKfWCvl0P04ghwRdvk6/50sX7V qakCnFYUagOOmocVlHJi1oHePLF0kI1suXDJAwfEAByEnA+pfk1z24ol5AqqJAO7po GTIfGVcYZfWdoGbXAZTsslbI57syC5uj2ogFv4Eo= Received: from mail.harfang.homelinux.org (ip-83-134-187-39.dsl.scarlet.be [83.134.187.39]) by eir.is.scarlet.be (8.14.5/8.14.5) with ESMTP id qA9Ge2Si013388 for ; Fri, 9 Nov 2012 17:40:03 +0100 X-Scarlet: d=1352479203 c=83.134.187.39 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id DC10961B54 for ; Fri, 9 Nov 2012 17:40:02 +0100 (CET) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id Bi2V2eCn98Z8 for ; Fri, 9 Nov 2012 17:39:57 +0100 (CET) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 5B55D6175F for ; Fri, 9 Nov 2012 17:39:57 +0100 (CET) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.77) (envelope-from ) id 1TWrcb-0006uw-0B for dev@commons.apache.org; Fri, 09 Nov 2012 17:39:57 +0100 Date: Fri, 9 Nov 2012 17:39:56 +0100 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [math] Math-817 and .equals questions. . Message-ID: <20121109163956.GV20488@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <8172D639BA76A14AA5C9DE7E13E0CEBE4DBEB60BAD@10.stjude.org> <8172D639BA76A14AA5C9DE7E13E0CEBE4DBEC20F87@10.stjude.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8172D639BA76A14AA5C9DE7E13E0CEBE4DBEC20F87@10.stjude.org> X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: eir 20002; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at eir X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Hi Jared. > Any thoughts on the below email? If not, I will submit one patch, probably today or tomorrow. > > ------------------------------- > > Hello, > > I am about to submit some code for issue Math-817 involving fitting multivariate normal mixture models using the EM algorithm. In order to simplify the unit test, I added overrode equals and hashCode. This in turn required me to make a few changes to code in the previously resolved issues Math-815 and Math-816. Am I supposed to just send one patch to 817, or am I supposed to break the patches up according to issue number? > > Also, I notice the equals method in org.apache.commons.math3.linear.AbstractRealMatrix directly compares the results of getEntry(), which are often doubles. Is this OK? I don't have a great deal of experience in overriding equals where doubles are involved. I have read that it is a good idea to use Double.doubleToLongBits and the use "==" or "!=". > > http://www.javapractices.com/topic/TopicAction.do?Id=17 > It will be better to have a discussion based on some actual code. [If you need a feature for MATH-817, it's fine to add it in the same patch.] Best regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org