Mix multiple hashcodes into one.

@param hash1 First hashcode to mix
@param hash2 Second hashcode to mix
@param hash3 Third hashcode to mix
@return Mixed hash code
11054
public static int mixHashCodes(int hash1, int hash2, int hash3) {
    long result = hash1 * HASHPRIME + hash2;
    return (int) (result * HASHPRIME + hash3);
  }
804687
def merkleroot(hashes):
    
    if len(hashes) == 1:
        return binascii.hexlify(bytearray(reversed(hashes[0])))
    if len(hashes) % 2 == 1:
        hashes.append(hashes[-1])
    parent_hashes = []
    for i in range(0, len(hashes)-1, 2):
        first_round_hash = hashlib.sha256(hashes[i] + hashes[i+1]).digest()
        second_round_hash = hashlib.sha256(first_round_hash).digest()
        parent_hashes.append(second_round_hash)
    return merkleroot(parent_hashes)
910208
def _combine_hash_arrays(arrays, num_items):
    
    try:
        first = next(arrays)
    except StopIteration:
        return np.array([], dtype=np.uint64)

    arrays = itertools.chain([first], arrays)

    mult = np.uint64(1000003)
    out = np.zeros_like(first) + np.uint64(0x345678)
    for i, a in enumerate(arrays):
        inverse_i = num_items - i
        out ^= a
        out *= mult
        mult += np.uint64(82520 + inverse_i + inverse_i)
    assert i + 1 == num_items, 'Fed in wrong num_items'
    out += np.uint64(97531)
    return out
1284591
private static long mixK1(long k1) {
    k1 *= C1;
    k1 = Long.rotateLeft(k1, 31);
    k1 *= C2;
    return k1;
  }
929525
public static int hashBytes(byte[] bytes, int offset, int length) {
    int hash = 1;
    for (int i = offset; i < offset + length; i++) {
      hash = (31 * hash) + bytes[i];
    }
    return hash;
  }
551571
static void buildHashTable(Block keyBlock, int keyOffset, int keyCount, MethodHandle keyBlockHashCode, int[] outputHashTable, int hashTableOffset, int hashTableSize)
    {
        for (int i = 0; i < keyCount; i++) {
            int hash = getHashPosition(keyBlock, keyOffset + i, keyBlockHashCode, hashTableSize);
            while (true) {
                if (outputHashTable[hashTableOffset + hash] == -1) {
                    outputHashTable[hashTableOffset + hash] = i;
                    break;
                }
                hash++;
                if (hash == hashTableSize) {
                    hash = 0;
                }
            }
        }
    }
127529
@Deprecated
  private static ArrayList<FrequencyTableEntry> hashToFreqEntries(
      HashMap<String, ArrayList<Integer>> hash) {
    ArrayList<FrequencyTableEntry> res = new ArrayList<FrequencyTableEntry>();
    for (Entry<String, ArrayList<Integer>> e : hash.entrySet()) {
      char[] payload = e.getKey().toCharArray();
      int frequency = e.getValue().size();
      for (Integer i : e.getValue()) {
        res.add(new FrequencyTableEntry(i, payload.clone(), frequency));
      }
    }
    return res;
  }
1211642
int hash(ByteBuffer indices, ByteBuffer vertices, ByteBuffer normals, ByteBuffer colors) {
		int hashCode = 0;
		hashCode += indices.hashCode();
		hashCode += vertices.hashCode();
		hashCode += normals.hashCode();
		hashCode += colors.hashCode();
		
		return hashCode;
	}
1011584
def tran_hash(self, a, b, c, n):
        """"""
        return (((TRAN[(a+n)&255]^TRAN[b]*(n+n+1))+TRAN[(c)^TRAN[n]])&255)
1036822
public static <T> HashSet<T> newHashSet(boolean isSorted, Enumeration<T> enumration) {
		if (null == enumration) {
			return newHashSet(isSorted, (T[]) null);
		}
		final HashSet<T> set = isSorted ? new LinkedHashSet<T>() : new HashSet<T>();
		while (enumration.hasMoreElements()) {
			set.add(enumration.nextElement());
		}
		return set;
	}
1182428
private List<String> splitSimhash(Long simhash) {
		final int bitNum = this.bitNum;
		final int fracBitNum = this.fracBitNum;

		final List<String> ls = new ArrayList<String>();
		final StringBuilder sb = new StringBuilder();
		for (int i = 0; i < bitNum; i++) {
			sb.append(simhash >> i & 1);
			if ((i + 1) % fracBitNum == 0) {
				ls.add(sb.toString());
				sb.setLength(0);
			}
		}
		return ls;
	}
1216129
def combine_hashes(hashes):
  """"""
  hasher = sha1()
  for h in sorted(hashes):
    h = ensure_binary(h)
    hasher.update(h)
  return hasher.hexdigest() if PY3 else hasher.hexdigest().decode('utf-8')
152229
public static Hash merge(Hash a, Hash b) {
        try {
            MessageDigest digest = MessageDigest.getInstance("SHA-256");
            digest.update(a.bytes);
            return Hash.createFromSafeArray(digest.digest(digest.digest(b.bytes)));
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        }
    }
936635
def deep_merge(hash_one, hash_two)
      merged = hash_one.dup
      hash_two.each do |key, value|
        merged[key] = case
        when hash_one[key].is_a?(Hash) && value.is_a?(Hash)
          deep_merge(hash_one[key], value)
        when hash_one[key].is_a?(Array) && value.is_a?(Array)
          (hash_one[key] + value).uniq
        else
          value
        end
      end
      merged
    end
1080358
public static long[] hash(final long in, final long seed, final long[] hashOut) {
    final long h1 = seed ^ mixK1(in);
    final long h2 = seed;
    return finalMix128(h1, h2, 8, hashOut);
  }
528468
def merge!(hash1, hash2)
      hash2.each_pair do |name, m|
        if m[:hide]
          if hash1[name]
            hash1.delete(name)
          else
            msg = "@hide used but #{m[:tagname]} #{m[:name]} not found in parent class"
            Logger.warn(:hide, msg, m[:files][0])
          end
        else
          if hash1[name]
            store_overrides(hash1[name], m)
          end
          hash1[name] = m
        end
      end
    end
442880
public static HashFunction[] createHashFunctions(final int seed,
            final int num) {
        final HashFunction[] hashFunctions = new HashFunction[num];
        for (int i = 0; i < num; i++) {
            hashFunctions[i] = Hashing.murmur3_128(seed + i);
        }
        return hashFunctions;
    }