test_class.declarator: standAlone = false
test_class.original_string: boolean standAlone = false;
test_class.type: boolean
test_class.var_name: standAlone
test_class.file: descriptor/fingerprint/src/test/java/org/openscience/cdk/similarity/TanimotoTest.java
test_class.identifier: TanimotoTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void keggR00258() throws java.lang.Exception {
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          String smiles1 = "O=C(O)CCC(=O)C(=O)O";
          String smiles2 = "O=C(O)C(N)CCC(=O)O";
          String smiles3 = "O=C(O)C(N)C";
          String smiles4 = "CC(=O)C(=O)O";
          IAtomContainer molecule1 = sp.parseSmiles(smiles1);
          IAtomContainer molecule2 = sp.parseSmiles(smiles2);
          IAtomContainer molecule3 = sp.parseSmiles(smiles3);
          IAtomContainer molecule4 = sp.parseSmiles(smiles4);
          Fingerprinter fingerprinter = new Fingerprinter(1024, 6);
          BitSet bs1 = fingerprinter.getBitFingerprint(molecule1).asBitSet();
          BitSet bs2 = fingerprinter.getBitFingerprint(molecule2).asBitSet();
          BitSet bs3 = fingerprinter.getBitFingerprint(molecule3).asBitSet();
          BitSet bs4 = fingerprinter.getBitFingerprint(molecule4).asBitSet();
  
          assertThat((double) Tanimoto.calculate(bs1, bs2), is(closeTo(0.75, 0.1)));
          assertThat((double) Tanimoto.calculate(bs1, bs3), is(closeTo(0.46, 0.1)));
          assertThat((double) Tanimoto.calculate(bs1, bs4), is(closeTo(0.52, 0.1)));
          assertThat((double) Tanimoto.calculate(bs2, bs3), is(closeTo(0.53, 0.1)));
          assertThat((double) Tanimoto.calculate(bs2, bs4), is(closeTo(0.42, 0.1)));
          assertThat((double) Tanimoto.calculate(bs3, bs4), is(closeTo(0.8, 0.1)));
      }
test_case.class_method_signature: TanimotoTest.keggR00258()
test_case.full_signature: @Test public void keggR00258()
test_case.identifier: keggR00258
test_case.invocations: getInstance parseSmiles parseSmiles parseSmiles parseSmiles asBitSet getBitFingerprint asBitSet getBitFingerprint asBitSet getBitFingerprint asBitSet getBitFingerprint assertThat calculate is closeTo assertThat calculate is closeTo assertThat calculate is closeTo assertThat calculate is closeTo assertThat calculate is closeTo assertThat calculate is closeTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void keggR00258()
focal_class.file: descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java
focal_class.identifier: Tanimoto
focal_class.class_method_signature: Tanimoto.Tanimoto()
focal_class.full_signature: private  Tanimoto()
focal_class.identifier: Tanimoto
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Tanimoto()
focal_class.class_method_signature: Tanimoto.calculate(BitSet bitset1, BitSet bitset2)
focal_class.full_signature: public static float calculate(BitSet bitset1, BitSet bitset2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (BitSet bitset1, BitSet bitset2)
focal_class.return: float
focal_class.signature: float calculate(BitSet bitset1, BitSet bitset2)
focal_class.class_method_signature: Tanimoto.calculate(IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.full_signature: public static double calculate(IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.return: double
focal_class.signature: double calculate(IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.class_method_signature: Tanimoto.calculate(double[] features1, double[] features2)
focal_class.full_signature: public static float calculate(double[] features1, double[] features2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (double[] features1, double[] features2)
focal_class.return: float
focal_class.signature: float calculate(double[] features1, double[] features2)
focal_class.class_method_signature: Tanimoto.calculate(Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.full_signature: public static float calculate(Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.return: float
focal_class.signature: float calculate(Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.class_method_signature: Tanimoto.calculate(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.full_signature: public static double calculate(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.return: double
focal_class.signature: double calculate(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.class_method_signature: Tanimoto.method1(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.full_signature: public static double method1(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.identifier: method1
focal_class.modifiers: public static
focal_class.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.return: double
focal_class.signature: double method1(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.class_method_signature: Tanimoto.method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.full_signature: public static double method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.identifier: method2
focal_class.modifiers: public static
focal_class.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.return: double
focal_class.signature: double method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_method.body: public static float calculate(BitSet bitset1, BitSet bitset2) throws CDKException {
          float _bitset1_cardinality = bitset1.cardinality();
          float _bitset2_cardinality = bitset2.cardinality();
          if (bitset1.size() != bitset2.size()) {
              throw new CDKException("Bitsets must have the same bit length");
          }
          BitSet one_and_two = (BitSet) bitset1.clone();
          one_and_two.and(bitset2);
          float _common_bit_count = one_and_two.cardinality();
          return _common_bit_count / (_bitset1_cardinality + _bitset2_cardinality - _common_bit_count);
      }
focal_method.class_method_signature: Tanimoto.calculate(BitSet bitset1, BitSet bitset2)
focal_method.full_signature: public static float calculate(BitSet bitset1, BitSet bitset2)
focal_method.identifier: calculate
focal_method.invocations: cardinality cardinality size size clone and cardinality
focal_method.modifiers: public static
focal_method.parameters: (BitSet bitset1, BitSet bitset2)
focal_method.return: float
focal_method.signature: float calculate(BitSet bitset1, BitSet bitset2)