// Path: happyresearch/src/main/java/happy/research/utils/SimUtils.java
// public enum SimMethod {
// 	COS, PCC, MSD, CPC, SRC, BS, PIP, SM, iufCOS, caPCC
// };


import happy.research.utils.SimUtils.SimMethod;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

			{
				String userB = users.get(j);
				Map<String, Rating> bsRatings = userRatingsMap.get(userB);
				if (bsRatings == null || bsRatings.size() < 1) continue;

				for (Entry<String, Rating> en : asRatings.entrySet())
				{
					String ai = en.getKey();
					Rating ar = en.getValue();

					if (bsRatings.containsKey(ai))
					{
						double asRating = ar.getRating();
						double bsRating = bsRatings.get(ai).getRating();
						double distance = Math.abs(asRating - bsRating);

						int num = distanceNumMap.get(distance);
						distanceNumMap.put(distance, num + 1);
					}

				}
			}
		}

		return distanceNumMap;
	}

	@Override
	protected Performance runMultiThreads() throws Exception
	{

// Path: happyresearch/src/main/java/happy/research/utils/SimUtils.java
// public enum SimMethod {
// 	COS, PCC, MSD, CPC, SRC, BS, PIP, SM, iufCOS, caPCC
// };


// Path: happyresearch/src/main/java/happy/research/cf/ClassicCF_mt.java
import happy.research.utils.SimUtils.SimMethod;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

			{
				String userB = users.get(j);
				Map<String, Rating> bsRatings = userRatingsMap.get(userB);
				if (bsRatings == null || bsRatings.size() < 1) continue;

				for (Entry<String, Rating> en : asRatings.entrySet())
				{
					String ai = en.getKey();
					Rating ar = en.getValue();

					if (bsRatings.containsKey(ai))
					{
						double asRating = ar.getRating();
						double bsRating = bsRatings.get(ai).getRating();
						double distance = Math.abs(asRating - bsRating);

						int num = distanceNumMap.get(distance);
						distanceNumMap.put(distance, num + 1);
					}

				}
			}
		}

		return distanceNumMap;
	}

	@Override
	protected Performance runMultiThreads() throws Exception
	{

		if (params.SIMILARITY_METHOD == SimMethod.BS) distanceNum = probeDistanceNums();
