test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/EccentricConnectivityIndexDescriptorTest.java
test_class.identifier: EccentricConnectivityIndexDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testEccentricConnectivityIndex() throws ClassNotFoundException, CDKException, java.lang.Exception {
          String filename = "data/hin/gravindex.hin";
          InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
          ISimpleChemObjectReader reader = new HINReader(ins);
          ChemFile content = (ChemFile) reader.read((ChemObject) new ChemFile());
          List cList = ChemFileManipulator.getAllAtomContainers(content);
          IAtomContainer ac = (IAtomContainer) cList.get(0);
  
          addImplicitHydrogens(ac);
  
          IntegerResult retval = (IntegerResult) descriptor.calculate(ac).getValue();
          //logger.debug(retval.intValue());
  
          Assert.assertEquals(254, retval.intValue(), 0);
      }
test_case.class_method_signature: EccentricConnectivityIndexDescriptorTest.testEccentricConnectivityIndex()
test_case.full_signature: @Test public void testEccentricConnectivityIndex()
test_case.identifier: testEccentricConnectivityIndex
test_case.invocations: getResourceAsStream getClassLoader getClass read getAllAtomContainers get addImplicitHydrogens getValue calculate assertEquals intValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEccentricConnectivityIndex()
focal_class.declarator: NAMES = {"ECCEN"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES = {"ECCEN"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/EccentricConnectivityIndexDescriptor.java
focal_class.identifier: EccentricConnectivityIndexDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.EccentricConnectivityIndexDescriptor()
focal_class.full_signature: public  EccentricConnectivityIndexDescriptor()
focal_class.identifier: EccentricConnectivityIndexDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EccentricConnectivityIndexDescriptor()
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.getSpecification()
focal_class.full_signature: @Override public DescriptorSpecification getSpecification()
focal_class.identifier: getSpecification
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DescriptorSpecification
focal_class.signature: DescriptorSpecification getSpecification()
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.setParameters(Object[] params)
focal_class.full_signature: @Override public void setParameters(Object[] params)
focal_class.identifier: setParameters
focal_class.modifiers: @Override public
focal_class.parameters: (Object[] params)
focal_class.return: void
focal_class.signature: void setParameters(Object[] params)
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.getParameters()
focal_class.full_signature: @Override public Object[] getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] getParameters()
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.getDescriptorNames()
focal_class.full_signature: @Override public String[] getDescriptorNames()
focal_class.identifier: getDescriptorNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getDescriptorNames()
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.getParameterNames()
focal_class.full_signature: @Override public String[] getParameterNames()
focal_class.identifier: getParameterNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getParameterNames()
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.getParameterType(String name)
focal_class.full_signature: @Override public Object getParameterType(String name)
focal_class.identifier: getParameterType
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: Object
focal_class.signature: Object getParameterType(String name)
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.calculate(IAtomContainer container)
focal_class.full_signature: @Override public DescriptorValue calculate(IAtomContainer container)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer container)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IAtomContainer container)
focal_class.class_method_signature: EccentricConnectivityIndexDescriptor.getDescriptorResultType()
focal_class.full_signature: @Override public IDescriptorResult getDescriptorResultType()
focal_class.identifier: getDescriptorResultType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IDescriptorResult
focal_class.signature: IDescriptorResult getDescriptorResultType()
focal_class.superclass: extends AbstractMolecularDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtomContainer container) {
          IAtomContainer local = AtomContainerManipulator.removeHydrogens(container);
  
          int natom = local.getAtomCount();
          int[][] admat = AdjacencyMatrix.getMatrix(local);
          int[][] distmat = PathTools.computeFloydAPSP(admat);
  
          int eccenindex = 0;
          for (int i = 0; i < natom; i++) {
              int max = -1;
              for (int j = 0; j < natom; j++) {
                  if (distmat[i][j] > max) max = distmat[i][j];
              }
              int degree = local.getConnectedBondsCount(i);
              eccenindex += max * degree;
          }
          IntegerResult retval = new IntegerResult(eccenindex);
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), retval,
                  getDescriptorNames(), null);
      }
focal_method.class_method_signature: EccentricConnectivityIndexDescriptor.calculate(IAtomContainer container)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer container)
focal_method.identifier: calculate
focal_method.invocations: removeHydrogens getAtomCount getMatrix computeFloydAPSP getConnectedBondsCount getSpecification getParameterNames getParameters getDescriptorNames
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer container)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtomContainer container)