Ejemplo n.º 1
0
        public static int calculateInterestRecomendationScore(string userId, string friendsId)
        {
            ArrayList userInterests    = ActivityDAL.getActivitiesByUserId(userId);
            ArrayList friendsInterests = ActivityDAL.getActivitiesByUserId(friendsId);;
            int       Score            = 0;

            foreach (string uInterest in userInterests)
            {
                foreach (string friendInterest in friendsInterests)
                {
                    if (uInterest.Equals(friendInterest))
                    {
                        Score += 1 * Global.WEIGHT_INTERESTS;
                    }
                }
            }
            return(Score);
        }