public double[] prob(int[] ps, int pos) {
		double[] p = new double[4];
		double[] r = new double[4];
		double[] q = new double[4];
		for (int g = 0; g < windowsize; g++) {
			if (true) {
				p[0] = 1.0;
				p[1] = 1.0;
				p[2] = 1.0;
				for (int i = g + 1; i < windowsize; i++) {
					p[0] += model[0][ps[pos]][ps[pos + g - whalf]][g][ps[pos
							+ i - whalf]][i];
					p[1] += model[1][ps[pos]][ps[pos + g - whalf]][g][ps[pos
							+ i - whalf]][i];
					p[2] += model[2][ps[pos]][ps[pos + g - whalf]][g][ps[pos
							+ i - whalf]][i];
				}
				r[0] += Math.log(p[0] / (double) (p[1] + p[2]));
				r[1] += Math.log(p[1] / (double) (p[0] + p[2]));
				r[2] += Math.log(p[2] / (double) (p[1] + p[0]));
				q[0] += Math.log(summatrix(model, ps[pos], ps[pos + g - whalf],
						g)[0]
						/ (double) (summatrix(model, ps[pos], ps[pos + g
								- whalf], g)[1] + summatrix(model, ps[pos],
									ps[pos + g - whalf], g)[2]));
				q[1] += Math.log(summatrix(model, ps[pos], ps[pos + g - whalf],
						g)[1]
						/ (double) (summatrix(model, ps[pos], ps[pos + g
								- whalf], g)[0] + summatrix(model, ps[pos],
									ps[pos + g - whalf], g)[2]));
				q[2] += Math.log(summatrix(model, ps[pos], ps[pos + g - whalf],
						g)[2]
						/ (double) (summatrix(model, ps[pos], ps[pos + g
								- whalf], g)[1] + summatrix(model, ps[pos],
									ps[pos + g - whalf], g)[0]));
			}
		}
		p[0] = (2.0 / windowsize) * r[0] * (windowsize - 2.0) / (windowsize)
				* q[0];
		p[1] = (2.0 / windowsize) * r[1] * (windowsize - 2.0) / (windowsize)
				* q[1];
		p[2] = (2.0 / windowsize) * r[2] * (windowsize - 2.0) / (windowsize)
				* q[2];
		if (p[0] > p[1] && p[0] > p[2])
			p[3] = 0;
		else if (p[1] > p[0] && p[1] > p[2])
			p[3] = 1;
		else if (p[2] > p[0] && p[2] > p[1])
			p[3] = 2;
		else
			p[3] = 3;
		return p;
	}