// Token: 0x06000004 RID: 4 RVA: 0x000021C4 File Offset: 0x000003C4 static ImageHasher() { for (int i = 0; i < 256; i++) { ImageHasher.BitCounts8[i] = (byte)ImageHasher.CountSetBits(i); } for (int j = 0; j < 65536; j++) { int num = 0; for (int k = j; k > 0; k >>= 8) { num += (int)ImageHasher.BitCounts8[k & 255]; } ImageHasher.BitCounts16[j] = (ushort)num; } }
// Token: 0x06000008 RID: 8 RVA: 0x000022DB File Offset: 0x000004DB public static double ComputeSimilarity(ulong hash1, ulong hash2) { return((double)(64 - ImageHasher.ComputeHammingDistance(hash1, hash2)) * 0.015625); }
// Token: 0x06000005 RID: 5 RVA: 0x00002244 File Offset: 0x00000444 private static int CountSetBits(int n) { return(ImageHasher.CountSetBits((ulong)((long)n))); }