AutoRegressiveSpectrum { public boolean process(IReadDataBlock data, final int nar) { clear(); int nlags = nar == 0 ? computeDefaultLags(data.getLength()) : nar; if (nlags < 0) { return false; } switch (method_) { case Durbin: computeDurbin(data, nlags); break; case Ols: computeOls(data, nlags); } return ar != null; } AutoRegressiveSpectrum(Method m); boolean process(IReadDataBlock data, final int nar); static int computeDefaultLags(int n); double value(double f); double getSigma(); IReadDataBlock getCoefficients(); static final int MAX_AR; }
@Test public void testDurbin() { AutoRegressiveSpectrum ar=new AutoRegressiveSpectrum(Method.Durbin); ar.process(X, 30); }
@Test public void testOls() { AutoRegressiveSpectrum ar=new AutoRegressiveSpectrum(Method.Ols); ar.process(X, 30); }