DataModel dataModel = getDataModel();
FastIDSet prefs1 = dataModel.getItemIDsFromUser(userID1);
FastIDSet prefs2 = dataModel.getItemIDsFromUser(userID2);
int prefs1Size = prefs1.size();
int prefs2Size = prefs2.size();
int intersectionSize = prefs1Size < prefs2Size ? prefs2.intersectionSize(prefs1) : prefs1.intersectionSize(prefs2);
return doSimilarity(prefs1Size, prefs2Size, intersectionSize);
}
/**
* Calculate City Block Distance from total non-zero values and intersections and map to a similarity value.