code: @Override
      public DescriptorValue calculate(IAtomContainer atomContainer) {
          wienerNumbers = new DoubleArrayResult(2);
          double wienerPathNumber = 0; //wienerPath
          double wienerPolarityNumber = 0; //wienerPol
  
          matr = ConnectionMatrix.getMatrix(AtomContainerManipulator.removeHydrogens(atomContainer));
          int[][] distances = PathTools.computeFloydAPSP(matr);
  
          int partial;
          for (int i = 0; i < distances.length; i++) {
              for (int j = 0; j < distances.length; j++) {
                  partial = distances[i][j];
                  wienerPathNumber += partial;
                  if (partial == 3) {
                      wienerPolarityNumber += 1;
                  }
              }
          }
          wienerPathNumber = wienerPathNumber / 2;
          wienerPolarityNumber = wienerPolarityNumber / 2;
  
          wienerNumbers.add(wienerPathNumber);
          wienerNumbers.add(wienerPolarityNumber);
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), wienerNumbers,
                  getDescriptorNames());
      }
docs: Calculate the Wiener numbers.
  
  @param  atomContainer   The {@link IAtomContainer} for which this descriptor is to be calculated
  @return wiener numbers as array of 2 doubles