code: @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);
      }
docs: Calculates the eccentric connectivity
  
  @param  container  Parameter is the atom container.
  @return            An IntegerResult value representing the eccentric connectivity index