Good hash function for struct key that has three ints

For a simple C ++ structure that has three ints to identify a unique structure, which can be a good implementation of a hash function if you don't know too much about the realistic values ​​of a, b, and c. Do I need to use struct as Key for unordered_map?

struct Key {

        int a, b, c;

    }
+4
source share
1 answer

Pass the whole structure to Murmurhash: https://sites.google.com/site/murmurhash/

(, , , , xor ..). - , . , .

+1

Source: https://habr.com/ru/post/1526423/


All Articles