fozziethebeat/S-Space — comment on commit 4488f8a05b15a971b87a1436e264562de4870da2
File: src/edu/ucla/sspace/vector/Vector.java line 49
By fozziethebeat:

Is this a good hash code for vectors? Wouldn't that essentially make the two vectors {0, 1} and {1, 0} have the same hash code? In cases where we have a lot of really sparse vectors with approximately the same number of single occurance features per vector (common in wordsi), they would all have the same hash code and end up in the same bucket, thus eliminating any benefit from storing them in a hash map or hash set.

Maybe it should be something along the lines of
sum_nonzerovalues (value XOR index)
that way the hashcode is incorporating the index of the value as well.