@SuppressWarnings("unchecked")
	private void regroupe() {
		int x = (int) log2(kmap.getColumn() * kmap.getRow());
		ArrayList<KarnaughNode> array = new ArrayList<KarnaughNode>();
		for (int i = 1; i < x + 1; i++) {
			for (int j = 0; j < arrayList.size(); j++) {
				for (int k = 0; k < arrayList.size(); k++) {
					if (arrayList.get(j).numberOfItems == (int) Math.pow(2,
							i - 1)
							&& arrayList.get(k).numberOfItems == (int) Math
									.pow(2, i - 1)) {
						int y = IsJoinable(arrayList.get(j), arrayList.get(k));
						if (y != -1) {
							String s = getNewBinaryAdress(
									arrayList.get(j).nodes,
									IsJoinable(arrayList.get(j),
											arrayList.get(k)));
							KarnaughNode n = new KarnaughNode(s, false,
									arrayList.get(j).numberOfItems * 2);
							n.cellesAdress = getCellesAdress(arrayList.get(j),
									arrayList.get(k));

							arrayList.get(j).flag = true;
							arrayList.get(k).flag = true;
							if (!alreadyExist(n))
								arrayList.add(n);

						}
					}
				}
			}

			for (int s = 0; s < arrayList.size(); s++) {
				if (arrayList.get(s).numberOfItems == (int) Math.pow(2, i - 1)) {
					array.add(arrayList.get(s));
					arrayList.remove(s);
					s--;
				}
			}
		}
		arrayList = (ArrayList<KarnaughNode>) array.clone();
		deleteUsedBlocs();
	}