public static float[][] getFirstCenter(float[][][] p, int cluster, int min,
			int max) {
		int k = max - min + 1;
		float temp[][] = new float[k][p[0][1].length + 1]; // cluster centroid,the first dimension is index
		float dis[][] = new float[p.length][p.length];// distance of samples
		float maxdis = 0;// maximum distance of samples

		int c1 = 0, c2 = 0; // record the index of farthest sample

		for (int i = 0; i < p.length; i++) {
			if ((int) p[i][0][0] == cluster) {
				for (int j = 0; j < p.length; j++) {
					if ((int) p[j][0][0] == cluster) {
						dis[i][j] = Calculate.getDataDistance(p[i][1], p[j][1]);
						if (dis[i][j] > maxdis) {
							maxdis = dis[i][j];
							c1 = i;
							c2 = j;
						}
					}
				}
			}
		}
		temp[0][0] = min;
		for (int m = 1; m < p[c1][1].length + 1; m++) {
			temp[0][m] = p[c1][1][m - 1];
		}
		temp[1][0] = min + 1;
		for (int m = 1; m < p[c2][1].length + 1; m++) {
			temp[1][m] = p[c2][1][m - 1];
		}

		return temp;
	}