test_class.file: descriptor/fingerprint/src/test/java/org/openscience/cdk/fingerprint/SubstructureFingerprinterTest.java
test_class.identifier: SubstructureFingerprinterTest
test_class.superclass: extends AbstractFixedLengthFingerprinterTest
test_case.body: @Test
      public void testGetCountFingerprint() throws Exception {
          // See other function for specific test cases
      }
test_case.class_method_signature: SubstructureFingerprinterTest.testGetCountFingerprint()
test_case.full_signature: @Test public void testGetCountFingerprint()
test_case.identifier: testGetCountFingerprint
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetCountFingerprint()
focal_class.declarator: keys = new ArrayList<>()
focal_class.modifier: private
focal_class.original_string: private List<Key> keys = new ArrayList<>();
focal_class.type: List<Key>
focal_class.var_name: keys
focal_class.file: descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/SubstructureFingerprinter.java
focal_class.identifier: SubstructureFingerprinter
focal_class.interfaces: implements IFingerprinter
focal_class.class_method_signature: SubstructureFingerprinter.SubstructureFingerprinter(String[] smarts)
focal_class.full_signature: public  SubstructureFingerprinter(String[] smarts)
focal_class.identifier: SubstructureFingerprinter
focal_class.modifiers: public
focal_class.parameters: (String[] smarts)
focal_class.signature:  SubstructureFingerprinter(String[] smarts)
focal_class.class_method_signature: SubstructureFingerprinter.SubstructureFingerprinter()
focal_class.full_signature: public  SubstructureFingerprinter()
focal_class.identifier: SubstructureFingerprinter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SubstructureFingerprinter()
focal_class.class_method_signature: SubstructureFingerprinter.setSmarts(String[] smarts)
focal_class.full_signature: private void setSmarts(String[] smarts)
focal_class.identifier: setSmarts
focal_class.modifiers: private
focal_class.parameters: (String[] smarts)
focal_class.return: void
focal_class.signature: void setSmarts(String[] smarts)
focal_class.class_method_signature: SubstructureFingerprinter.getBitFingerprint(IAtomContainer atomContainer)
focal_class.full_signature: @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_class.identifier: getBitFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: IBitFingerprint
focal_class.signature: IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.getCountFingerprint(IAtomContainer atomContainer)
focal_class.full_signature: @Override public ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_class.identifier: getCountFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: ICountFingerprint
focal_class.signature: ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.full_signature: @Override public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.identifier: getRawFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer iAtomContainer)
focal_class.return: Map<String, Integer>
focal_class.signature: Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.getSize()
focal_class.full_signature: @Override public int getSize()
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getSize()
focal_class.class_method_signature: SubstructureFingerprinter.getSubstructure(int bitIndex)
focal_class.full_signature: public String getSubstructure(int bitIndex)
focal_class.identifier: getSubstructure
focal_class.modifiers: public
focal_class.parameters: (int bitIndex)
focal_class.return: String
focal_class.signature: String getSubstructure(int bitIndex)
focal_class.superclass: extends AbstractFingerprinter
focal_method.body: @Override
      public ICountFingerprint getCountFingerprint(IAtomContainer atomContainer) throws CDKException {
          if (keys.isEmpty()) {
              throw new CDKException("No substructures were defined");
          }
  
          // init SMARTS invariants (connectivity, degree, etc)
          SmartsPattern.prepare(atomContainer);
  
          final Map<Integer, Integer> map = new TreeMap<Integer, Integer>();
          for (int i = 0; i < keys.size(); i++) {
              Pattern ptrn = keys.get(i).pattern;
              map.put(i,
                      ptrn.matchAll(atomContainer)
                          .countUnique());
          }
  
          final int length = keys.size();
          final int size = map.size();
          final int[] hash = new int[size], count = new int[size];
          int n = 0;
          for (int h : map.keySet()) {
              hash[n] = h;
              count[n++] = map.get(h);
          }
  
          return new ICountFingerprint() {
  
              @Override
              public long size() { return length; }
  
              @Override
              public int numOfPopulatedbins() { return size; }
  
              @Override
              public int getCount(int index) { return count[index]; }
  
              @Override
              public int getHash(int index) { return hash[index]; }
  
              @Override
              public void merge(ICountFingerprint fp) {}
  
              @Override
              public void setBehaveAsBitFingerprint(boolean behaveAsBitFingerprint) {}
  
              @Override
              public boolean hasHash(int hash) { return map.containsKey(hash); }
  
              @Override
              public int getCountForHash(int hash) { return map.get(hash); }
          };
      }
focal_method.class_method_signature: SubstructureFingerprinter.getCountFingerprint(IAtomContainer atomContainer)
focal_method.full_signature: @Override public ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_method.identifier: getCountFingerprint
focal_method.invocations: isEmpty prepare size get put countUnique matchAll size size keySet get containsKey get
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer atomContainer)
focal_method.return: ICountFingerprint
focal_method.signature: ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)