internal static int StringHashCode(FacetLabel label) { int hash = label.GetHashCode(); hash = hash ^ (((int)((uint)hash >> 20)) ^ ((int)((uint)hash >> 12))); hash = hash ^ ((int)((uint)hash >> 7)) ^ ((int)((uint)hash >> 4)); return hash; }
public override int GetOrdinal(FacetLabel label) { if (label == null) { return(LabelToOrdinal.INVALID_ORDINAL); } int hash = CompactLabelToOrdinal.StringHashCode(label); for (int i = 0; i < this.hashArrays.Length; i++) { int ord = GetOrdinal(this.hashArrays[i], label, hash); if (ord != COLLISION) { return(ord); } } return(this.collisionMap.Get(label, hash)); }