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? If the h,J,and properties fields are the same, this yields the same hash, but I'm not sure if we might run into problems with hashes potentially overlapping (though provided the base array and dictionary types have good hashes, that shouldn't occur except in highly rare circumstances).
On Monday, October 20, 2014 4:37:48 PM UTC-7, Steven G. Johnson wrote: > > Defining == is not enough. You have to define a hash(x) method, otherwise > it will default to hashing based on the memory address (which changes > between runs).
