docs: public static <A> double[] samLMR(A sorted, NumberArrayAdapter<?, A> adapter, int nmom) {
      final int n = adapter.size(sorted);
      final double[] sum = new double[nmom];
      nmom = n < nmom ? n : nmom;
      // Estimate probability weighted moments (unbiased)
      for(int i = 0; i < n; i++) {
        double term = adapter.getDouble(sorted, i);
        // Robustness: skip bad values
        if(Double.isInfinite(term) || Double.isNaN(term)) {
          continue;
        }
        sum[0] += term;
        for(int j = 1, z = i; j < nmom; j++, z--) {
          term *= z;
          sum[j] += term;
        }
      }
      // Normalize by "n choose (j + 1)"
      sum[0] /= n;
      double z = n;
      for(int j = 1; j < nmom; j++) {
        z *= n - j;
        sum[j] /= z;
      }
      normalizeLMR(sum, nmom);
      // Handle case when lambda2 == 0, by setting tau3...tauN = 0:
      if(sum[1] == 0) {
        for(int i = 2; i < nmom; i++) {
          sum[i] = 0.; // tau3...tauN = 0.
        }
        return sum;
      }
      // Map lambda3...lambdaN to tau3...tauN
      for(int i = 2; i < nmom; i++) {
        sum[i] /= sum[1];
      }
      return sum;
    }