class Autocorrelation {

    public void evaluate(List<Datum> data) {
        double[] values = formatData(data);
        // FFT
        Complex[] fft = fftTran.transform(values, TransformType.FORWARD);
        // Multiply by complex conjugate
        for (int i = 0; i < fft.length; i ++) {
            fft[i] = fft[i].multiply(fft[i].conjugate());
        }
        // Inverse transform
        fft = fftTran.transform(fft, TransformType.INVERSE);

        correlations = new double[maxLag];
        for (int i = 1; i < maxLag; i++) {
            correlations[i] = fft[i].getReal() / fft[0].getReal();
        }
    }

    public  Autocorrelation(int maxLag, int metricIdx);

}