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 C5970DB6D for ; Wed, 7 Nov 2012 23:33:39 +0000 (UTC) Received: (qmail 39308 invoked by uid 500); 7 Nov 2012 23:33:39 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 39229 invoked by uid 500); 7 Nov 2012 23:33:39 -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 39221 invoked by uid 99); 7 Nov 2012 23:33:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2012 23:33:39 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Jared.Becksfort@stjude.org designates 192.55.208.21 as permitted sender) Received: from [192.55.208.21] (HELO mgate2.stjude.org) (192.55.208.21) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2012 23:33:33 +0000 Message-ID: <8172D639BA76A14AA5C9DE7E13E0CEBE4DBEB60BAD@10.stjude.org> X-IronPort-AV: E=Sophos;i="4.80,734,1344229200"; d="scan'208";a="45168361" From: "Becksfort, Jared" To: Commons Developers List Date: Wed, 7 Nov 2012 17:33:10 -0600 Subject: [math] Math-817 and .equals questions Thread-Topic: [math] Math-817 and .equals questions Thread-Index: Ac29QD/AR0+qiTTXQUqAMwNF5L1AhQ== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SEF-7853D99-ADF1-478E-8894-213D316B8FFA: 1 X-V-Loop: Yes X-Virus-Checked: Checked by ClamAV on apache.org Hello, I am about to submit some code for issue Math-817 involving fitting multiva= riate normal mixture models using the EM algorithm. In order to simplify t= he 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 suppos= ed to break the patches up according to issue number? Also, I notice the equals method in org.apache.commons.math3.linear.Abstrac= tRealMatrix directly compares the results of getEntry(), which are often do= ubles. 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 u= se Double.doubleToLongBits and the use "=3D=3D" or "!=3D". http://www.javapractices.com/topic/TopicAction.do?Id=3D17 Thanks, Jared Email Disclaimer: www.stjude.org/emaildisclaimer Consultation Disclaimer: www.stjude.org/consultationdisclaimer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org