Fork me on GitHub
  • API

    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 Lucene.Net.Util.BytesRefs with offsets and lengths rather than raw byte arrays.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    HashFunction
    MurmurHash2
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    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
    Lucene.Net.Util.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 © 2021 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.