@Test public void testMultiMostPopularItemsRescorer() { RescorerProvider multi = new MultiRescorerProvider(new SimpleModRescorerProvider(2), new SimpleModRescorerProvider(3)); Rescorer provider = multi.getMostPopularItemsRescorer(null); assertNotNull(provider); assertTrue(provider instanceof MultiRescorer); assertTrue(provider.isFiltered("ABC")); assertTrue(provider.isFiltered("AB")); assertFalse(provider.isFiltered("ABCDEF")); }
@Override public Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args) { List<Rescorer> rescorers = Lists.newArrayListWithCapacity(providers.length); for (RescorerProvider provider : providers) { Rescorer rescorer = provider.getMostPopularItemsRescorer(recommender, args); if (rescorer != null) { rescorers.add(rescorer); } } return buildRescorer(rescorers); }
MultiRescorerProvider extends AbstractRescorerProvider { @Override public Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args) { List<Rescorer> rescorers = Lists.newArrayListWithCapacity(providers.length); for (RescorerProvider provider : providers) { Rescorer rescorer = provider.getMostPopularItemsRescorer(recommender, args); if (rescorer != null) { rescorers.add(rescorer); } } return buildRescorer(rescorers); } }
MultiRescorerProvider extends AbstractRescorerProvider { @Override public Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args) { List<Rescorer> rescorers = Lists.newArrayListWithCapacity(providers.length); for (RescorerProvider provider : providers) { Rescorer rescorer = provider.getMostPopularItemsRescorer(recommender, args); if (rescorer != null) { rescorers.add(rescorer); } } return buildRescorer(rescorers); } MultiRescorerProvider(RescorerProvider... providers);  MultiRescorerProvider(List<RescorerProvider> providers); }
MultiRescorerProvider extends AbstractRescorerProvider { @Override public Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args) { List<Rescorer> rescorers = Lists.newArrayListWithCapacity(providers.length); for (RescorerProvider provider : providers) { Rescorer rescorer = provider.getMostPopularItemsRescorer(recommender, args); if (rescorer != null) { rescorers.add(rescorer); } } return buildRescorer(rescorers); } MultiRescorerProvider(RescorerProvider... providers);  MultiRescorerProvider(List<RescorerProvider> providers); @Override Rescorer getRecommendRescorer(String[] userIDs, OryxRecommender recommender, String... args); @Override Rescorer getRecommendToAnonymousRescorer(String[] itemIDs, OryxRecommender recommender, String... args); @Override Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args); @Override PairRescorer getMostSimilarItemsRescorer(OryxRecommender recommender, String... args); }
MultiRescorerProvider extends AbstractRescorerProvider { @Override public Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args) { List<Rescorer> rescorers = Lists.newArrayListWithCapacity(providers.length); for (RescorerProvider provider : providers) { Rescorer rescorer = provider.getMostPopularItemsRescorer(recommender, args); if (rescorer != null) { rescorers.add(rescorer); } } return buildRescorer(rescorers); } MultiRescorerProvider(RescorerProvider... providers);  MultiRescorerProvider(List<RescorerProvider> providers); @Override Rescorer getRecommendRescorer(String[] userIDs, OryxRecommender recommender, String... args); @Override Rescorer getRecommendToAnonymousRescorer(String[] itemIDs, OryxRecommender recommender, String... args); @Override Rescorer getMostPopularItemsRescorer(OryxRecommender recommender, String... args); @Override PairRescorer getMostSimilarItemsRescorer(OryxRecommender recommender, String... args);  }