public static ArrayList<Pair> filterCandidate(
			HashMap<Integer, Integer> res, ArrayList<Pair> candidate,
			HashMap<Integer, Integer> not) {// ,HashMap<Integer,Integer>
		ArrayList<Pair> keeped = new ArrayList<Pair>(candidate.size()); // degree
		if (res.size() >= k_plex)// 否则即便是全部不连接也没关系，起不到过滤效果
		{
			ArrayList<Integer> critSet = new ArrayList<Integer>();
			getCriticalSet(res, critSet);
			HashSet<Integer> intersection = new HashSet<Integer>();
			if (critSet.size() > 0)// 节点临界，用于过滤
			{
				intersection.addAll(oneLeap.get(critSet.get(0)));// 先加入第一个元素
				for (int i = 1; i < critSet.size(); i++) {
					HashSet<Integer> adj = oneLeap.get(critSet.get(i));
					intersection.retainAll(adj);// 不断取交集
				}
				// 取intersection和candidate的交集，剔除两跳外数据，自然也将res中数据剔除了
				// res中数据不在candidate中
				for (Pair p : candidate) {
					//if (intersection.contains(p.point) && p.discon < k_plex)//已经被保证了
					if (intersection.contains(p.point))
						keeped.add(p);
				}
				initDegree(keeped);
				candidate = null;
				Iterator<Entry<Integer, Integer>> iter = not.entrySet()
						.iterator();
				while (iter.hasNext()) {
					Entry<Integer, Integer> en = iter.next();
//					if (!intersection.contains(en.getKey())
//							|| en.getValue() > k_plex - 1) {//已经被保证了
					if (!intersection.contains(en.getKey()))
						iter.remove();
				}
			} else {
				initDegree(candidate);
				return candidate;
			}
		} else {
			initDegree(candidate);
			return candidate;
		}
		// filterAgain(keeped, res);
		// filterAgain(not,res);
		return keeped;
	}