public static class TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> extends Object
TwoStepsLcpMonotoneMinimalPerfectHashFunction.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
built
Whether
build() has already been called. |
protected Iterable<? extends T> |
keys |
protected long |
numKeys |
protected int |
signatureWidth |
protected File |
tempDir |
protected TransformationStrategy<? super T> |
transform |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
TwoStepsLcpMonotoneMinimalPerfectHashFunction<T> |
build()
Builds a two-steps LCP monotone minimal perfect hash function.
|
TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> |
keys(Iterable<? extends T> keys)
Specifies the keys to hash.
|
TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> |
numKeys(long numKeys)
Specifies the number of keys.
|
TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> |
signed(int signatureWidth)
Specifies that the resulting
LcpMonotoneMinimalPerfectHashFunction should be signed using a given number of bits per key. |
TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> |
tempDir(File tempDir)
Specifies a temporary directory for the
ChunkedHashStore. |
TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> |
transform(TransformationStrategy<? super T> transform)
Specifies the transformation strategy for the keys to hash.
|
protected TransformationStrategy<? super T> transform
protected long numKeys
protected int signatureWidth
protected File tempDir
protected boolean built
build() has already been called.public TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> keys(Iterable<? extends T> keys)
keys - the keys to hash.public TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> numKeys(long numKeys)
The argument must be equal to the number of keys returned by an iterator
generated by the set of keys. Without this information,
a first scan of the key set will be necessary to compute its cardinality,
unless the set of keys implements Size64 or Collection.
numKeys - the keys to hash.public TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> transform(TransformationStrategy<? super T> transform)
transform - a transformation strategy for the keys to hash.public TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> signed(int signatureWidth)
LcpMonotoneMinimalPerfectHashFunction should be signed using a given number of bits per key.signatureWidth - a signature width, or 0 for no signature.public TwoStepsLcpMonotoneMinimalPerfectHashFunction.Builder<T> tempDir(File tempDir)
ChunkedHashStore.tempDir - a temporary directory for the ChunkedHashStore. files, or null for the standard temporary directory.public TwoStepsLcpMonotoneMinimalPerfectHashFunction<T> build() throws IOException
TwoStepsLcpMonotoneMinimalPerfectHashFunction instance with the specified parameters.IllegalStateException - if called more than once.IOException