public Set<Integer> getClusterMembers(Set<Integer> clusters, String clusterMembership){
        Map<Integer,Integer> CM = readMap(clusterMembership, false);
        Set<Integer> clusterMembers = new HashSet<Integer>();
        Map<Integer,Integer> MemCount = new HashMap<Integer,Integer>();
        for(int i : clusters)
        {
            MemCount.put(i, 0);
        }
        for(int i : CM.keySet())
        {
            if(clusters.contains(CM.get(i)))
            {
                clusterMembers.add(i);
                int c = MemCount.get(CM.get(i));
                MemCount.put(CM.get(i),++c);
            }
        }
        for(int i : clusterMembers)
        {
            System.out.println(i);
        }
        System.out.println("Number of nodes per cluster: ");
        List<Integer> ks = new ArrayList<Integer>(MemCount.keySet());
        Collections.sort(ks);
        for(int i : ks)
        {
            System.out.println(i + ": " + MemCount.get(i));
        }
        return clusterMembers;
    }