C# hashcode for array of ints

后端 未结 7 621
不思量自难忘°
不思量自难忘° 2020-11-28 13:24

I have a class that internally is just an array of integers. Once constructed the array never changes. I\'d like to pre-compute a good hashcode so that this class can be ver

7条回答
  •  清酒与你
    2020-11-28 14:10

    I think choosing a good hash-algorithm would have to be based on the distribution (in a probability sense) of the integer values.

    Have a look at Wikipedia for a list of algorithms

提交回复
热议问题