@SuppressWarnings("unchecked")
	public static void computeKplex(ArrayList<Integer> res,
			ArrayList<Integer> candidate) {
		int rSize = res.size();
		//根据k-plex定义过滤备选集(最多不与k-1个节点相连)
		filterCandidate(res, candidate);
		int canSizeN = candidate.size();
		int sum = rSize + canSizeN;
		if (sum >= quasiCliqueSize && sum >= kPlexSize) {//&& sum >= kPlexSize
			if (judgeKplex2(res, candidate))// 是kplex
			{ //&& sum >= kPlexSize
				if(sum >= kPlexSize)
				{
				kPlexSize = sum;
				result.clear();
				result.addAll(res);
				result.addAll(candidate);
				//是clique输出
				}
			} else {
				int y = candidate.get(0);// 其他节点，存在策略
				// 子图包含y
				// res中多了y
				ArrayList<Integer> resA = new ArrayList<Integer>();
				resA.addAll(res);
				resA.add(y);
				ArrayList<Integer> canA = new ArrayList<Integer>();
				canA.clear();
				getT2(canA, y,candidate);
				//getT3(canA, y,candidate);
				int p=canA.indexOf(y);
				if(p!=-1)
					canA.remove(p);				
				levelNumber++;
				//避免层数过多使得系统栈溢出，当levelNumber过大时(大于levelExtream)，将状态存栈
				if (levelNumber >= levelExtream) {
					sGraph sA = new sGraph(canA.size());
					sA.setCandidate(canA);
					sA.setRes(resA);
					stack.add(sA);
					
					resA.remove(resA.size()-1);
					candidate.remove(0);
					sGraph sB = new sGraph(candidate.size());
					sB.setCandidate(candidate);
					sB.setRes(resA);
					stack.add(sB);
					return;
				}
				//子图包含y
				computeKplex(resA, canA);
				levelNumber--;
				resA.remove(resA.size()-1);
				candidate.remove(0);
				//子图不包含y
				computeKplex(resA, candidate);
				levelNumber--;
				//维护状态栈层数在合理的大小
				if (levelNumber <= -10)
					levelNumber = 0;
			}
		}
	}