| Constructor and Description |
|---|
FingerprinterTool() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Integer> |
differences(BitSet s,
BitSet t)
List all differences between the two bit vectors.
|
static boolean |
isSubset(BitSet bs1,
BitSet bs2)
Checks whether all the positive bits in BitSet bs2 occur in BitSet bs1.
|
static List<Integer> |
listDifferences(BitSet bs1,
BitSet bs2)
This lists all bits set in bs2 and not in bs2 (other way round not considered) in a list and to logger.
|
static IBitFingerprint |
makeBitFingerprint(Map<String,Integer> features)
Convert a mapping of features and their counts to a 1024-bit binary fingerprint.
|
static IBitFingerprint |
makeBitFingerprint(Map<String,Integer> features,
int len)
Convert a mapping of features and their counts to a binary fingerprint.
|
static IBitFingerprint |
makeBitFingerprint(Map<String,Integer> features,
int len,
int bits)
Convert a mapping of features and their counts to a binary fingerprint.
|
static ICountFingerprint |
makeCountFingerprint(Map<String,Integer> features)
Wrap a mapping of features and their counts to a continuous (count based) fingerprint.
|
public static boolean isSubset(BitSet bs1, BitSet bs2)
Example:
Molecule mol = MoleculeFactory.makeIndole();
BitSet bs = Fingerprinter.getBitFingerprint(mol);
Molecule frag1 = MoleculeFactory.makePyrrole();
BitSet bs1 = Fingerprinter.getBitFingerprint(frag1);
if (Fingerprinter.isSubset(bs, bs1)) {
System.out.println("Pyrrole is subset of Indole.");
}
bs1 - The reference BitSetbs2 - The BitSet which is compared with bs1public static List<Integer> listDifferences(BitSet bs1, BitSet bs2)
differences(java.util.BitSet, java.util.BitSet) for a method to list all differences,
including those missing present in bs2 but not bs1.bs1 - First bitsetbs2 - Second bitsetdifferences(java.util.BitSet, java.util.BitSet)public static Set<Integer> differences(BitSet s, BitSet t)
listDifferences(java.util.BitSet, java.util.BitSet) which only list
those which are set in s but not in t.s - a bit vectort - another bit vectorpublic static IBitFingerprint makeBitFingerprint(Map<String,Integer> features)
features - features to includemakeBitFingerprint(java.util.Map, int, int)public static IBitFingerprint makeBitFingerprint(Map<String,Integer> features, int len)
features - features to includelen - fingerprint lengthmakeBitFingerprint(java.util.Map, int, int)public static IBitFingerprint makeBitFingerprint(Map<String,Integer> features, int len, int bits)
bits operand.features - features to includelen - fingerprint lengthbits - number of bits to set for each patternpublic static ICountFingerprint makeCountFingerprint(Map<String,Integer> features)
features - features to includeCopyright © 2018. All Rights Reserved.