FITKMS_business.Util.RecommendationService.GetLocalWeight C# (CSharp) 메소드

GetLocalWeight() 개인적인 메소드

private GetLocalWeight ( int userId, int tagId ) : double
userId int
tagId int
리턴 double
        private double GetLocalWeight(int userId, int tagId)
        {
            System.Data.Objects.ObjectParameter total = new System.Data.Objects.ObjectParameter("BrojTagova", 0);
            int tagNum = DATagovi.CountByUser(total, userId, tagId);
            int maxTagNum = Convert.ToInt32(total.Value);

            if (maxTagNum == 0)
                return 0;

            return (double)tagNum / maxTagNum;
        }