@TestClass(value="org.openscience.cdk.fingerprint.FingerprinterToolTest") public class FingerprinterTool extends Object
Constructor and Description |
---|
FingerprinterTool() |
Modifier and Type | Method and Description |
---|---|
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
|
@TestMethod(value="testIsSubset_BitSet_BitSet") public static boolean isSubset(BitSet bs1, BitSet bs2)
Example:
Molecule mol = MoleculeFactory.makeIndole(); BitSet bs = Fingerprinter.getFingerprint(mol); Molecule frag1 = MoleculeFactory.makePyrrole(); BitSet bs1 = Fingerprinter.getFingerprint(frag1); if (Fingerprinter.isSubset(bs, bs1)) { System.out.println("Pyrrole is subset of Indole."); }
bs1
- The reference BitSetbs2
- The BitSet which is compared with bs1@TestMethod(value="testListDifferences_BitSet_BitSet") public static List<Integer> listDifferences(BitSet bs1, BitSet bs2)
bs1
- First bitsetbs2
- Second bitset