test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: public static
test_class.original_string: public static IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.file: tool/group/src/test/java/org/openscience/cdk/group/AtomRefinableTest.java
test_class.identifier: AtomRefinableTest
test_case.body: @Test
      public void getElementPartitionTest() {
          String acpString = "C0N1C2P3C4N5";
          Partition expected = Partition.fromString("0,2,4|1,5|3");
          
          IAtomContainer ac = AtomContainerPrinter.fromString(acpString, builder);
          AtomRefinable refinable = new AtomRefinable(ac);
          
          Partition elPartition = refinable.getInitialPartition();
          Assert.assertEquals(expected, elPartition);
      }
test_case.class_method_signature: AtomRefinableTest.getElementPartitionTest()
test_case.full_signature: @Test public void getElementPartitionTest()
test_case.identifier: getElementPartitionTest
test_case.invocations: fromString fromString getInitialPartition assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getElementPartitionTest()
focal_class.declarator: atomContainer
focal_class.modifier: private final
focal_class.original_string: private final IAtomContainer atomContainer;
focal_class.type: IAtomContainer
focal_class.var_name: atomContainer
focal_class.declarator: connectionTable
focal_class.modifier: private
focal_class.original_string: private int[][] connectionTable;
focal_class.type: int[][]
focal_class.var_name: connectionTable
focal_class.declarator: bondOrders
focal_class.modifier: private
focal_class.original_string: private int[][] bondOrders;
focal_class.type: int[][]
focal_class.var_name: bondOrders
focal_class.declarator: ignoreElements
focal_class.modifier: private
focal_class.original_string: private boolean ignoreElements;
focal_class.type: boolean
focal_class.var_name: ignoreElements
focal_class.declarator: ignoreBondOrders
focal_class.modifier: private
focal_class.original_string: private boolean ignoreBondOrders;
focal_class.type: boolean
focal_class.var_name: ignoreBondOrders
focal_class.declarator: maxBondOrder
focal_class.modifier: private
focal_class.original_string: private int maxBondOrder;
focal_class.type: int
focal_class.var_name: maxBondOrder
focal_class.file: tool/group/src/main/java/org/openscience/cdk/group/AtomRefinable.java
focal_class.identifier: AtomRefinable
focal_class.interfaces: implements Refinable
focal_class.class_method_signature: AtomRefinable.AtomRefinable(IAtomContainer atomContainer)
focal_class.full_signature: public  AtomRefinable(IAtomContainer atomContainer)
focal_class.identifier: AtomRefinable
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.signature:  AtomRefinable(IAtomContainer atomContainer)
focal_class.class_method_signature: AtomRefinable.AtomRefinable(IAtomContainer atomContainer, boolean ignoreElements, boolean ignoreBondOrders)
focal_class.full_signature: public  AtomRefinable(IAtomContainer atomContainer, boolean ignoreElements, boolean ignoreBondOrders)
focal_class.identifier: AtomRefinable
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer, boolean ignoreElements, boolean ignoreBondOrders)
focal_class.signature:  AtomRefinable(IAtomContainer atomContainer, boolean ignoreElements, boolean ignoreBondOrders)
focal_class.class_method_signature: AtomRefinable.neighboursInBlock(Set<Integer> block, int vertexIndex)
focal_class.full_signature: @Override public Invariant neighboursInBlock(Set<Integer> block, int vertexIndex)
focal_class.identifier: neighboursInBlock
focal_class.modifiers: @Override public
focal_class.parameters: (Set<Integer> block, int vertexIndex)
focal_class.return: Invariant
focal_class.signature: Invariant neighboursInBlock(Set<Integer> block, int vertexIndex)
focal_class.class_method_signature: AtomRefinable.getSimpleInvariant(Set<Integer> block, int vertexIndex)
focal_class.full_signature: private Invariant getSimpleInvariant(Set<Integer> block, int vertexIndex)
focal_class.identifier: getSimpleInvariant
focal_class.modifiers: private
focal_class.parameters: (Set<Integer> block, int vertexIndex)
focal_class.return: Invariant
focal_class.signature: Invariant getSimpleInvariant(Set<Integer> block, int vertexIndex)
focal_class.class_method_signature: AtomRefinable.getMultipleInvariant(Set<Integer> block, int vertexIndex)
focal_class.full_signature: private Invariant getMultipleInvariant(Set<Integer> block, int vertexIndex)
focal_class.identifier: getMultipleInvariant
focal_class.modifiers: private
focal_class.parameters: (Set<Integer> block, int vertexIndex)
focal_class.return: Invariant
focal_class.signature: Invariant getMultipleInvariant(Set<Integer> block, int vertexIndex)
focal_class.class_method_signature: AtomRefinable.getVertexCount()
focal_class.full_signature: @Override public int getVertexCount()
focal_class.identifier: getVertexCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getVertexCount()
focal_class.class_method_signature: AtomRefinable.getConnectivity(int vertexI, int vertexJ)
focal_class.full_signature: @Override public int getConnectivity(int vertexI, int vertexJ)
focal_class.identifier: getConnectivity
focal_class.modifiers: @Override public
focal_class.parameters: (int vertexI, int vertexJ)
focal_class.return: int
focal_class.signature: int getConnectivity(int vertexI, int vertexJ)
focal_class.class_method_signature: AtomRefinable.getConnectedIndices(int vertexIndex)
focal_class.full_signature: private int[] getConnectedIndices(int vertexIndex)
focal_class.identifier: getConnectedIndices
focal_class.modifiers: private
focal_class.parameters: (int vertexIndex)
focal_class.return: int[]
focal_class.signature: int[] getConnectedIndices(int vertexIndex)
focal_class.class_method_signature: AtomRefinable.getInitialPartition()
focal_class.full_signature: @Override public Partition getInitialPartition()
focal_class.identifier: getInitialPartition
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Partition
focal_class.signature: Partition getInitialPartition()
focal_class.class_method_signature: AtomRefinable.setupConnectionTable(IAtomContainer atomContainer)
focal_class.full_signature: private void setupConnectionTable(IAtomContainer atomContainer)
focal_class.identifier: setupConnectionTable
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: void
focal_class.signature: void setupConnectionTable(IAtomContainer atomContainer)
focal_method.body: @Override
      public Partition getInitialPartition() {
          if (ignoreElements) {
              int n = atomContainer.getAtomCount();
              return Partition.unit(n);
          }
  
          Map<String, SortedSet<Integer>> cellMap = new HashMap<String, SortedSet<Integer>>();
          int numberOfAtoms = atomContainer.getAtomCount();
          for (int atomIndex = 0; atomIndex < numberOfAtoms; atomIndex++) {
              String symbol = atomContainer.getAtom(atomIndex).getSymbol();
              SortedSet<Integer> cell;
              if (cellMap.containsKey(symbol)) {
                  cell = cellMap.get(symbol);
              } else {
                  cell = new TreeSet<Integer>();
                  cellMap.put(symbol, cell);
              }
              cell.add(atomIndex);
          }
  
          List<String> atomSymbols = new ArrayList<String>(cellMap.keySet());
          Collections.sort(atomSymbols);
  
          Partition elementPartition = new Partition();
          for (String key : atomSymbols) {
              SortedSet<Integer> cell = cellMap.get(key);
              elementPartition.addCell(cell);
          }
  
          return elementPartition;
      }
focal_method.class_method_signature: AtomRefinable.getInitialPartition()
focal_method.full_signature: @Override public Partition getInitialPartition()
focal_method.identifier: getInitialPartition
focal_method.invocations: getAtomCount unit getAtomCount getSymbol getAtom containsKey get put add keySet sort get addCell
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Partition
focal_method.signature: Partition getInitialPartition()