commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becksfort, Jared" <Jared.Becksf...@STJUDE.ORG>
Subject [math] Math-817 and .equals questions
Date Wed, 07 Nov 2012 23:33:10 GMT
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

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


Mime
View raw message