public static Map<Integer, Double> getSimResourcesForUser(int userID, Map<Integer, Double> allResources, List<Map<Integer, Double>> userMaps, List<Map<Integer, Double>> resMaps, 
			List<Bookmark> trainList, List<Integer> userResources, Similarity sim) {
		Map<Integer, Double> resources = new LinkedHashMap<Integer, Double>();
		Map<Integer, Double> targetMap = null;	
		if (userID < userMaps.size()) {
			targetMap = userMaps.get(userID);
		}
		if (targetMap == null || targetMap.isEmpty()) {
			return resources;
		}
		resources.putAll(allResources);
		
		for (Map.Entry<Integer, Double> entry : resources.entrySet()) {
			Map<Integer, Double> rMap = resMaps.get(entry.getKey());
			if (!rMap.isEmpty() && !userResources.contains(entry.getKey())) {
				double bm25Value = (sim == Similarity.JACCARD ? Utilities.getJaccardFloatSim(targetMap, rMap) :
					Utilities.getCosineFloatSim(targetMap, rMap));
				entry.setValue(bm25Value);
			}
		}
		
		// return the sorted resources
		Map<Integer, Double> sortedResources = new TreeMap<Integer, Double>(new DoubleMapComparator(resources));
		sortedResources.putAll(resources);
		return sortedResources;
	}