Class MultipleProjectionsLocalitySensitiveHashFunction

  • All Implemented Interfaces:
    LocalitySensitiveHashFunction<NumberVector>

    @Reference(authors="M. Datar, N. Immorlica, P. Indyk, V. S. Mirrokni",
               title="Locality-sensitive hashing scheme based on p-stable distributions",
               booktitle="Proc. 20th Annual Symposium on Computational Geometry",
               url="https://doi.org/10.1145/997817.997857",
               bibkey="DBLP:conf/compgeom/DatarIIM04")
    public class MultipleProjectionsLocalitySensitiveHashFunction
    extends java.lang.Object
    implements LocalitySensitiveHashFunction<NumberVector>
    LSH hash function for vector space data. Depending on the choice of random vectors, it can be appropriate for Manhattan and Euclidean distances.

    Reference:

    M. Datar, N. Immorlica, P. Indyk, V. S. Mirrokni
    Locality-sensitive hashing scheme based on p-stable distributions
    Proc. 20th Annual Symposium on Computational Geometry

    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Detail

      • shift

        double[] shift
        Shift offset.
      • iwidth

        double iwidth
        Scaling factor: inverse of width.
      • randoms1

        int[] randoms1
        Random numbers for mixing the hash codes of the individual functions
      • MASK32

        private static final long MASK32
        Bit mask for signed int to unsigned long conversion.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MultipleProjectionsLocalitySensitiveHashFunction

        public MultipleProjectionsLocalitySensitiveHashFunction​(RandomProjectionFamily.Projection projection,
                                                                double width,
                                                                java.util.Random rnd)
        Constructor.
        Parameters:
        projection - Projection vectors
        width - Width of bins
        rnd - Random number generator