On Tuesday, October 21, 2014 2:35:01 AM UTC-4, Joshua Job wrote: > > So would something like > hash(x::ProblemInstance,h::Uint64=uint(0)) = 3*hash(x.h)+2*hash(x.J)+hash( > x.properties)+h > be a reasonable thing to do? >
No, it is enough to define: import Base: hash hash(x::ProblemInstance, h::Uint64) = hash(x.h, hash(x.J, hash(x.properties, h))) That is, you should use the hash(x,y) function itself to combine multiple hashes, not addition or any other ad-hoc bitmixing strategy.
