public class IntArrayCountFingerprint extends Object implements ICountFingerprint
| Constructor and Description |
|---|
IntArrayCountFingerprint() |
IntArrayCountFingerprint(Map<String,Integer> rawFingerprint) |
IntArrayCountFingerprint(Map<String,Integer> rawFingerprint,
boolean behaveAsBitFingerprint)
Create an
IntArrayCountFingerprint from a rawFingerprint
and if behaveAsBitFingerprint make it only return 0 or 1
as count thus behaving like a bit finger print. |
| Modifier and Type | Method and Description |
|---|---|
int |
getCount(int index)
Returns the count value for the bin with the given index.
|
int |
getCountForHash(int hash)
Get the number of times a certain hash exists in the fingerprint.
|
int |
getHash(int index)
Returns the hash corresponding to the given index in the fingerprint.
|
boolean |
hasHash(int hash)
Whether the fingerprint contains the given hash.
|
void |
merge(ICountFingerprint fp)
Merge all from
fp into the current fingerprint. |
int |
numOfPopulatedbins()
Returns the number of bins that are populated.
|
void |
setBehaveAsBitFingerprint(boolean behaveAsBitFingerprint)
Changes behaviour, if true is given the count fingerprint will
behave as a bit fingerprint and return 0 or 1 for counts.
|
long |
size()
Returns the number of bits of this fingerprint.
|
public IntArrayCountFingerprint()
public IntArrayCountFingerprint(Map<String,Integer> rawFingerprint, boolean behaveAsBitFingerprint)
IntArrayCountFingerprint from a rawFingerprint
and if behaveAsBitFingerprint make it only return 0 or 1
as count thus behaving like a bit finger print.rawFingerprint - the raw fpbehaveAsBitFingerprint - whether to behave as binary fp or notpublic long size()
ICountFingerprintsize in interface ICountFingerprintpublic int getCount(int index)
ICountFingerprintgetCount in interface ICountFingerprintindex - the index of the bin to return the number of hits for.public int getHash(int index)
ICountFingerprintgetHash in interface ICountFingerprintindex - the index of the bin to return the hash for.public int numOfPopulatedbins()
ICountFingerprintnumOfPopulatedbins in interface ICountFingerprintICountFingerprint.size()public void merge(ICountFingerprint fp)
ICountFingerprintfp into the current fingerprint.merge in interface ICountFingerprintfp - to be mergedpublic void setBehaveAsBitFingerprint(boolean behaveAsBitFingerprint)
ICountFingerprintsetBehaveAsBitFingerprint in interface ICountFingerprintpublic boolean hasHash(int hash)
ICountFingerprinthasHash in interface ICountFingerprintpublic int getCountForHash(int hash)
ICountFingerprintgetCountForHash in interface ICountFingerprintCopyright © 2021. All rights reserved.