class Autocorrelation {

    public static double[] calculate(double[] samples) {
        double[] acovResult = autocovariance(samples);
        double variance = acovResult[0];
        double[] autocorr = Arrays.stream(acovResult).map(x -> x / variance).toArray();
        return autocorr;
    }

}