Search Results for

    Show / Hide Table of Contents

    Class MurmurHash

    Murmur3 Hash implementation

    Inheritance
    object
    MurmurHash
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Util
    Assembly: Akka.dll
    Syntax
    public static class MurmurHash

    Fields

    | Edit this page View Source

    StartMagicA

    The initial magic integer in the first stream.

    Declaration
    public const uint StartMagicA = 2505324423
    Field Value
    Type Description
    uint
    | Edit this page View Source

    StartMagicB

    The initial magic integer in the second stream.

    Declaration
    public const uint StartMagicB = 718793509
    Field Value
    Type Description
    uint

    Methods

    | Edit this page View Source

    ArrayHash<T>(T[])

    Compute a high-quality hash of an array

    Declaration
    public static int ArrayHash<T>(T[] a)
    Parameters
    Type Name Description
    T[] a

    The array to hash.

    Returns
    Type Description
    int

    The hash code for the array.

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    ByteHash(byte[])

    Compute a high-quality hash of a byte array

    Declaration
    public static int ByteHash(byte[] b)
    Parameters
    Type Name Description
    byte[] b

    The byte array to hash.

    Returns
    Type Description
    int

    The hash code for the byte array.

    | Edit this page View Source

    ExtendHash(uint, uint, uint, uint)

    Incorporates a new value into an existing hash

    Declaration
    public static uint ExtendHash(uint hash, uint value, uint magicA, uint magicB)
    Parameters
    Type Name Description
    uint hash

    The prior hash value

    uint value

    The new value to incorporate

    uint magicA

    A magic integer from the left of the stream

    uint magicB

    A magic integer from a different stream

    Returns
    Type Description
    uint

    The updated hash value

    | Edit this page View Source

    FinalizeHash(uint)

    Once all hashes have been incorporated, this performs a final mixing.

    Declaration
    public static uint FinalizeHash(uint hash)
    Parameters
    Type Name Description
    uint hash

    The hash value to finalize.

    Returns
    Type Description
    uint

    The finalized hash value.

    | Edit this page View Source

    NextMagicA(uint)

    Given a magic integer from the first stream, compute the next

    Declaration
    public static uint NextMagicA(uint magicA)
    Parameters
    Type Name Description
    uint magicA

    The current magic value from the first stream.

    Returns
    Type Description
    uint

    The next magic value in the first stream.

    | Edit this page View Source

    NextMagicB(uint)

    Given a magic integer from the second stream, compute the next

    Declaration
    public static uint NextMagicB(uint magicB)
    Parameters
    Type Name Description
    uint magicB

    The current magic value from the second stream.

    Returns
    Type Description
    uint

    The next magic value in the second stream.

    | Edit this page View Source

    StartHash(uint)

    Begin a new hash with a seed value.

    Declaration
    public static uint StartHash(uint seed)
    Parameters
    Type Name Description
    uint seed

    The seed value to initialize the hash.

    Returns
    Type Description
    uint

    The initial hash value.

    | Edit this page View Source

    StringHash(string)

    Compute high-quality hash of a string

    Declaration
    public static int StringHash(string s)
    Parameters
    Type Name Description
    string s

    The string to hash.

    Returns
    Type Description
    int

    The hash code for the string.

    | Edit this page View Source

    SymmetricHash<T>(IEnumerable<T>, uint)

    Compute a hash that is symmetric in its arguments--that is, where the order of appearance of elements does not matter. This is useful for hashing sets, for example.

    Declaration
    public static int SymmetricHash<T>(IEnumerable<T> xs, uint seed)
    Parameters
    Type Name Description
    IEnumerable<T> xs

    The collection of elements to hash.

    uint seed

    The seed value for the hash.

    Returns
    Type Description
    int

    A hash code that is the same regardless of the order of elements in the collection.

    Type Parameters
    Name Description
    T
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET