private void contractEdge(Vertex v, int group) {
		Edge e;
		Vertex t;
		int i, j;

		for (i = 0; i < v.adjEdges.size(); i++) {
			e = graph.edges.get(v.adjEdges.get(i));
			if (e.flag == false
					&& groups.get(group).contains(e.head.id) == true) {
				e.flag = true;
				if (Debug.ON) {
					System.out.println("Contract Edge " + e.tail.id + " -- "
							+ e.head.id);
				}
				edgesNum--;
				if (e.tail.id != e.head.id) {
					// contract the other edge
					t = e.head;
					for (j = 0; j < t.adjEdges.size(); j++) {
						e = graph.edges.get(t.adjEdges.get(j));
						if (e.flag == false && e.head.id == v.id) {
							e.flag = true;
							if (Debug.ON) {
								System.out.println("Contract Edge " + e.tail.id
										+ " -- " + e.head.id);
							}
							edgesNum--;
							break;
						}
					}
				}
			}
		}
	}