public static int cluster (int clusterMax) {//Ă΂邽тɁAݒ肳ꂽ̃NX^̂AǂꂩЂƂ̃NX^w肵ĕԂ
		double rnd = Math.random();
		double minval = Double.MAX_VALUE;
		int index = 0;
		for (int k=0; k<clusterMax; k++) {
			double dist = Math.abs(rnd - (double)k/(double)clusterMax);
			if (dist < minval) {
				minval = dist;
				index = k;
			}
		}
		return index;
	}