/** * @author Sam Harwell * @author Mike Lischke */ export declare class MurmurHash { private static readonly defaultSeed; private constructor(); /** * Initialize the hash using the specified {@code seed}. * * @param seed the seed * * @returns the intermediate hash value */ static initialize(seed?: number): number; /** * Update the intermediate hash value for the next input {@code value}. * * @param hash The intermediate hash value. * @param value the value to add to the current hash. * @param deep Only used if `value` is an array and indicates that also all entries in the array are used for the * hash (recursively). * * @returns the updated intermediate hash value */ static update(hash: number, value: unknown, deep?: boolean): number; /** * An efficient hash method specifically for arrays, which does not go through the `update` method for each entry. * It's based on the `hashString` method and was extended to handle different array element types and even * nested arrays. * * @param hash The intermediate hash value. * @param array The array to hash. * @param deep If true then nested arrays are recursively hashed as well, otherwise a simple hash is used for them. * * @returns The computed hash. */ static updateFromArray(hash: number, array: ArrayLike, deep?: boolean): number; /** * Apply the final computation steps to the intermediate value {@code hash} * to form the final result of the MurmurHash 3 hash function. * * @param hash The intermediate hash value. * @param entryCount The number of values added to the hash. * * @returns the final hash result */ static finish: (hash: number, entryCount: number) => number; /** * An all-in-one convenience method to compute a hash for a single value. * * @param value The value to hash. * @param seed The seed for the hash value. * * @returns The computed hash. */ static hashCode: (value: unknown, seed?: number) => number; /** * Function to hash a string. Based on the implementation found here: * https://stackoverflow.com/a/52171480/1137174 * * @param hash The intermediate hash value. * @param str The string to hash. * * @returns The computed hash. */ private static hashString; }