コード例 #1
0
        public GenericUserSimilarity(UserSimilarity otherSimilarity, DataModel dataModel, int maxToKeep)
        {
            this.similarityMaps = new FastByIDMap <FastByIDMap <double> >();
            long[] itemIDs = longIteratorToList(dataModel.getUserIDs());
            IEnumerator <UserUserSimilarity> allSimilarities = new DataModelSimilaritiesIterator(otherSimilarity, itemIDs);

            this.initSimilarityMaps(TopItems.getTopUserUserSimilarities(maxToKeep, allSimilarities).GetEnumerator());
        }
コード例 #2
0
 public GenericUserSimilarity(IEnumerable <UserUserSimilarity> similarities, int maxToKeep)
 {
     this.similarityMaps = new FastByIDMap <FastByIDMap <double> >();
     this.initSimilarityMaps(TopItems.getTopUserUserSimilarities(maxToKeep, similarities.GetEnumerator()).GetEnumerator());
 }