Show / Hide Table of Contents

    Class MurmurHash2

    This is a very fast, non-cryptographic hash suitable for general hash-based lookup. See http://murmurhash.googlepages.com/ for more details.

    The C version of MurmurHash 2.0 found at that site was ported to Java by Andrzej Bialecki (ab at getopt org).

    The code from getopt.org was adapted by Mark Harwood in the form here as one of a pluggable choice of hashing functions as the core function had to be adapted to work with BytesRefs with offsets and lengths rather than raw byte arrays.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    HashFunction
    MurmurHash2
    Namespace: Lucene.Net.Codecs.Bloom
    Assembly: Lucene.Net.Codecs.dll
    Syntax
    public sealed class MurmurHash2 : HashFunction

    Fields

    | Improve this Doc View Source

    INSTANCE

    Declaration
    public static readonly MurmurHash2 INSTANCE
    Field Value
    Type Description
    MurmurHash2

    Methods

    | Improve this Doc View Source

    Hash(BytesRef)

    Declaration
    public override int Hash(BytesRef br)
    Parameters
    Type Name Description
    BytesRef br
    Returns
    Type Description
    System.Int32
    Overrides
    HashFunction.Hash(BytesRef)
    | Improve this Doc View Source

    Hash(Byte[], Int32, Int32, Int32)

    Declaration
    public static int Hash(byte[] data, int seed, int offset, int len)
    Parameters
    Type Name Description
    System.Byte[] data
    System.Int32 seed
    System.Int32 offset
    System.Int32 len
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Hash32(Byte[], Int32, Int32)

    Generates 32 bit hash from byte array with default seed value.

    Declaration
    public static int Hash32(byte[] data, int offset, int len)
    Parameters
    Type Name Description
    System.Byte[] data

    Byte array to hash.

    System.Int32 offset

    The start position in the array to hash.

    System.Int32 len

    Length of the array elements to hash.

    Returns
    Type Description
    System.Int32

    32 bit hash of the given array.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)