HashCodeOfSerialized() публичный статический Метод

Calculates a hash function of a path that was serialized with Serialize(FacetLabel, CharBlockArray).
public static HashCodeOfSerialized ( Lucene.Net.Facet.Taxonomy.WriterCache.CharBlockArray charBlockArray, int offset ) : int
charBlockArray Lucene.Net.Facet.Taxonomy.WriterCache.CharBlockArray
offset int
Результат int
        internal static int StringHashCode(CharBlockArray labelRepository, int offset)
        {
            int hash = CategoryPathUtils.HashCodeOfSerialized(labelRepository, offset);

            hash = hash ^ (((int)((uint)hash >> 20)) ^ ((int)((uint)hash >> 12)));
            hash = hash ^ ((int)((uint)hash >> 7)) ^ ((int)((uint)hash >> 4));
            return(hash);
        }
Пример #2
0
        internal static int StringHashCode(CharBlockArray labelRepository, int offset)
        {
            int hash = CategoryPathUtils.HashCodeOfSerialized(labelRepository, offset);

            hash = hash ^ hash.TripleShift(20) ^ hash.TripleShift(12);
            hash = hash ^ hash.TripleShift(7) ^ hash.TripleShift(4);
            return(hash);
        }
Пример #3
0
        internal static int StringHashCode(CharBlockArray labelRepository, int offset)
        {
            int hash = CategoryPathUtils.HashCodeOfSerialized(labelRepository, offset);

#pragma warning disable IDE0054 // Use compound assignment
            hash = hash ^ (((int)((uint)hash >> 20)) ^ ((int)((uint)hash >> 12)));
            hash = hash ^ ((int)((uint)hash >> 7)) ^ ((int)((uint)hash >> 4));
#pragma warning restore IDE0054 // Use compound assignment
            return(hash);
        }