public static void main(String args[]) throws IOException{
		try {
			GenData data = new GenData();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ArrayList<User> users = new ArrayList<User>(GenData.getUserMap().values());
		//HashSet<Business> businesses = new HashSet<Business>(GenData.getBusinessMap().values());
		HashSet<Review> reviews = new HashSet<Review>(GenData.getReviewMap().values());
		
		NewCommunity.fillUBStar(reviews);
		System.out.println("fillUBStar finished");
		NewCommunity.getAdjMtx(users);
		System.out.println(NewCommunity.bigramCounterMap.keySet().size());
		System.out.println(NewCommunity.numEdges);
		
		NewCommunity.getInitDeltaQ();
		
		System.out.println(NewCommunity.aMap.size());
		
		NewCommunity.mergeCommunity(users);
		BufferedWriter writer = new BufferedWriter(new FileWriter("clusters.txt"));
		for (User user : NewCommunity.clusters.keySet()){
			if (clusters.get(user).size() >= 10){
				writer.write(user.u_id + "	");
				for (User userInCluster : clusters.get(user)){
					writer.write(userInCluster.u_id + "	");
				}
				writer.newLine();
			}
		}
		writer.close();
		
	}