double normalizedgeometricRange(Sample x[]) {
        if (x.length == 0) {
            return 0;
        }

        double min[] = new double[n];
        double max[] = new double[n];

        double mean = 0;

        for (int i = 0; i < n; i++) {
            min[i] = Double.POSITIVE_INFINITY;
            max[i] = Double.NEGATIVE_INFINITY;

            for (int j = 0; j < x.length; j++) {
                min[i] = Math.min(x[j].x[i], min[i]);
                max[i] = Math.max(x[j].x[i], max[i]);
            }
            mean += Math.log(max[i] - min[i]);
        }
        return Math.exp(mean / n);
    }