Beispiel #1
0
 public GenericItemSimilarity(ItemSimilarity otherSimilarity, DataModel dataModel)
 {
     this.similarityMaps      = new FastByIDMap <FastByIDMap <double?> >();
     this.similarItemIDsIndex = new FastByIDMap <FastIDSet>();
     long[] itemIDs = GenericUserSimilarity.longIteratorToList(dataModel.getItemIDs());
     this.initSimilarityMaps(new DataModelSimilaritiesIterator(otherSimilarity, itemIDs));
 }
Beispiel #2
0
        public GenericItemSimilarity(ItemSimilarity otherSimilarity, DataModel dataModel, int maxToKeep)
        {
            this.similarityMaps      = new FastByIDMap <FastByIDMap <double?> >();
            this.similarItemIDsIndex = new FastByIDMap <FastIDSet>();
            long[] itemIDs = GenericUserSimilarity.longIteratorToList(dataModel.getItemIDs());
            DataModelSimilaritiesIterator allSimilarities = new DataModelSimilaritiesIterator(otherSimilarity, itemIDs);

            this.initSimilarityMaps(TopItems.getTopItemItemSimilarities(maxToKeep, allSimilarities).GetEnumerator());
        }