Class ManhattanHashFunctionFamily

  • All Implemented Interfaces:
    LocalitySensitiveHashFunctionFamily<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 ManhattanHashFunctionFamily
    extends AbstractProjectedHashFunctionFamily
    2-stable hash function family for 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
    • Constructor Detail

      • ManhattanHashFunctionFamily

        public ManhattanHashFunctionFamily​(RandomFactory random,
                                           double width,
                                           int k)
        Constructor.
        Parameters:
        random - Random generator
        width - Bin width
        k - Number of projections to combine.
    • Method Detail

      • isCompatible

        public boolean isCompatible​(Distance<?> df)
        Description copied from interface: LocalitySensitiveHashFunctionFamily
        Check whether the given distance function can be accelerated using this hash family.
        Parameters:
        df - Distance function.
        Returns:
        true when appropriate.