private SymbObj(ushort id) { data = SymbObjData(id); extraData = SymbObjExtraData(); Debug.Assert(GetSymbId() == id); stringRepr = IdxToStr(id); // Calculating the hash code ulong hcode = 0; int len = stringRepr.Length; for (int i = 0; i < len; i++) { hcode = 31 * hcode + stringRepr[i]; } hashcode = Hashing.Hashcode64(hcode); }
public override uint Hashcode() { if (hcode == Hashing.NULL_HASHCODE) { long hcode = 0; for (int i = 0; i < fieldIds.Length; i++) { hcode += Hashing.Hashcode(SymbObj.Get(fieldIds[i]).Hashcode(), col2[i].Hashcode()); } hcode = Hashing.Hashcode64(hcode); if (hcode == Hashing.NULL_HASHCODE) { hcode++; } } return(hcode); }
public static uint Hashcode(double x) { return(Hashing.Hashcode64(Miscellanea.DoubleBitsToULongBits(x))); }