sclass RepeatColumn extends Predictor { float[] nextColumn(float[] x) { ret x; } } sclass ShiftDown extends Predictor { float[] nextColumn(float[] f) { if (f == null) null; float[] g = copyColumn(f); for (int i = 1; i < l(f); i++) g[i] = f[i-1]; ret g; } } sclass LookLeft extends Predictor { int width; // how far to look left float[][] buf; int x; float[] nextColumn(float[] f) { if (f == null) null; if (buf == null) buf = new float[width][]; // exchange with data in rotating buffer // (will return null until buffer is filled) float[] g = buf[x]; buf[x] = f; x = (x+1) % width; ret g; } }