docs: private static double calculate_MDEF_norm(Node sn, Node cg) {
      // get the square sum of the counting neighborhoods box counts
      long sq = sn.getSquareSum(cg.getLevel() - sn.getLevel());
      /*
       * if the square sum is equal to box count of the sampling Neighborhood then
       * n_hat is equal one, and as cg needs to have at least one Element mdef
       * would get zero or lower than zero. This is the case when all of the
       * counting Neighborhoods contain one or zero Objects. Additionally, the
       * cubic sum, square sum and sampling Neighborhood box count are all equal,
       * which leads to sig_n_hat being zero and thus mdef_norm is either negative
       * infinite or undefined. As the distribution of the Objects seem quite
       * uniform, a mdef_norm value of zero ( = no outlier) is appropriate and
       * circumvents the problem of undefined values.
       */
      if(sq == sn.getCount()) {
        return 0.0;
      }
      // calculation of mdef according to the paper and standardization as done in
      // LOCI
      long cb = sn.getCubicSum(cg.getLevel() - sn.getLevel());
      double n_hat = (double) sq / sn.getCount();
      double sig_n_hat = FastMath.sqrt(cb * sn.getCount() - (sq * sq)) / sn.getCount();
      // Avoid NaN - correct result 0.0?
      if(sig_n_hat < Double.MIN_NORMAL) {
        return 0.0;
      }
      double mdef = n_hat - cg.getCount();
      return mdef / sig_n_hat;
    }