OBJECT - Type of object being sketchedpublic class BitSetLSHSketcher<OBJECT> extends Object implements org.openimaj.util.sketch.Sketcher<OBJECT,BitSet>
Sketcher that produces bit-string sketches encoded as a
BitSet. Only the least-significant bit of each hash function will be
appended to the final sketch. The length of the output array will be computed
such that the bit from each hash function is contained.| Constructor and Description |
|---|
BitSetLSHSketcher(org.openimaj.util.hash.HashFunction<OBJECT> first,
org.openimaj.util.hash.HashFunction<OBJECT>... remainder)
Construct with the given functions.
|
BitSetLSHSketcher(org.openimaj.util.hash.HashFunctionFactory<OBJECT> factory,
int nFuncs)
Construct with the factory which is used to produce the required number
of functions.
|
BitSetLSHSketcher(List<org.openimaj.util.hash.HashFunction<OBJECT>> functions)
Construct with the given functions.
|
| Modifier and Type | Method and Description |
|---|---|
int |
bitLength()
Get the length of the sketch in bits.
|
BitSet |
createSketch(OBJECT input) |
public BitSetLSHSketcher(List<org.openimaj.util.hash.HashFunction<OBJECT>> functions)
functions - the underlying hash functions.@SafeVarargs public BitSetLSHSketcher(org.openimaj.util.hash.HashFunction<OBJECT> first, org.openimaj.util.hash.HashFunction<OBJECT>... remainder)
first - the first functionremainder - the remainder of the functionspublic BitSetLSHSketcher(org.openimaj.util.hash.HashFunctionFactory<OBJECT> factory, int nFuncs)
factory - the factory to use to produce the underlying hash functions.nFuncs - the number of functions to create for the composition