public ReSampleMapRank(HashMap<String, Double> scoresByName, int sampleSize) {
		super(null, sampleSize);
		scoreByName = scoresByName;

		// Create a list ordered by score
		ArrayList<String> names = new ArrayList<String>();
		names.addAll(scoresByName.keySet());
		Collections.sort(names, new Comparator<String>() {

			@Override
			public int compare(String arg0, String arg1) {

				return scoreByName.get(arg0).compareTo(scoreByName.get(arg1));
			}
		});

		// Populate rank list
		rankByName = new HashMap<String, Integer>();
		scores = new int[names.size()];
		double latest = Double.NaN;
		int rank = 0;
		for( int i = 0; i < names.size(); i++ ) {
			String name = names.get(i);

			double score = scoresByName.get(name);
			if( latest != score ) rank++;
			latest = score;

			rankByName.put(name, rank);
			scores[i] = rank;
		}
	}