Class LcpMonotoneMinimalPerfectHashFunction<T>

    • Field Detail

      • n

        protected final long n
        The number of keys.
      • bucketSize

        protected final int bucketSize
        The size of a bucket.
      • bucketSizeMask

        protected final int bucketSizeMask
        The mask for log2BucketSize bits.
      • offsetLcpLength

        protected final GOV3Function<BitVector> offsetLcpLength
        A function mapping each key to the offset inside its bucket (lowest log2BucketSize bits) and to the length of the longest common prefix of its bucket (remaining bits).
      • lcp2Bucket

        protected final GOV3Function<BitVector> lcp2Bucket
        A function mapping each longest common prefix to its bucket.
      • signatureMask

        protected final long signatureMask
        The mask to compare signatures, or zero for no signatures.
      • signatures

        protected final LongBigList signatures
        The signatures.
    • Constructor Detail

      • LcpMonotoneMinimalPerfectHashFunction

        protected LcpMonotoneMinimalPerfectHashFunction​(Iterable<? extends T> keys,
                                                        long numKeys,
                                                        TransformationStrategy<? super T> transform,
                                                        int signatureWidth,
                                                        File tempDir)
                                                 throws IOException
        Creates a new LCP monotone minimal perfect hash function for the given keys.
        Parameters:
        keys - the keys to hash.
        numKeys - the number of keys, or -1 if the number of keys is not known (will be computed).
        transform - a transformation strategy for the keys.
        signatureWidth - a signature width, or 0 for no signature.
        tempDir - a temporary directory for the store files, or null for the standard temporary directory.
        Throws:
        IOException