amidst / toolbox

A Java Toolbox for Scalable Probabilistic Machine Learning
http://www.amidsttoolbox.com
Apache License 2.0
119 stars 35 forks source link

Attribute equality problem caused by hashCode() that depends on Object.hashCode() #101

Open puneetnanand opened 4 years ago

puneetnanand commented 4 years ago

AMIDST team, I am having to work around the problem with Attribute.java:hashCode() calling into stateSpaceType.hashCode() which has no hashCode defined and lets the Object.java:hashCode() get called which in turn uses the memory address that is different for the same state spaces. The Attribute class is also not extensible. So the result isn't beautiful. Please let me know if I am missing something.

andresmasegosa commented 4 years ago

Hi, thanks for point that out. Your are right. We'll have a look at that. But, feel free to make a PR if you think you have a good solution.