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());
        }
 public GenericUserSimilarity(IEnumerable <UserUserSimilarity> similarities, int maxToKeep)
 {
     this.similarityMaps = new FastByIDMap <FastByIDMap <double> >();
     this.initSimilarityMaps(TopItems.getTopUserUserSimilarities(maxToKeep, similarities.GetEnumerator()).GetEnumerator());
 }