commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becksfort, Jared" <Jared.Becksf...@STJUDE.ORG>
Subject RE: [math] Math-817 and .equals questions. .
Date Fri, 09 Nov 2012 16:14:47 GMT
Any thoughts on the below email?  If not, I will submit one patch, probably today or tomorrow.



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 "!=".


Email Disclaimer: Consultation Disclaimer:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message