K
Kevin
Hello!
For example, if I want to use this class as key to a hashtable, how do
we define its hashcode efficiently? I want to hash based on valueA,
ValueB, ValueC.
public class abc
{
int ValueA;
int ValueB;
int ValueC;
// other functions ...
//.....
}
A typical usage of this kind of hash is, for example, we want to hash a
3D point in a 3D space, where we need all these 3 int in order to
decide a position in 3D space. (or we can extend this to 4D, 5/5/6...)
Thanks a lot and have a nice day!
For example, if I want to use this class as key to a hashtable, how do
we define its hashcode efficiently? I want to hash based on valueA,
ValueB, ValueC.
public class abc
{
int ValueA;
int ValueB;
int ValueC;
// other functions ...
//.....
}
A typical usage of this kind of hash is, for example, we want to hash a
3D point in a 3D space, where we need all these 3 int in order to
decide a position in 3D space. (or we can extend this to 4D, 5/5/6...)
Thanks a lot and have a nice day!