@@ -0,0 +1,1207 @@
+package org.grouplens.lenskit.predict;%0A%0Aimport org.grouplens.lenskit.ItemScorer;%0Aimport org.grouplens.lenskit.RatingPredictor;%0Aimport org.grouplens.lenskit.vectors.MutableSparseVector;%0Aimport org.grouplens.lenskit.vectors.SparseVector;%0A%0Aimport javax.annotation.Nonnull;%0Aimport javax.inject.Inject;%0Aimport java.util.Collection;%0A%0A/**%0A * Item scorer that uses rating predictions.  Use this if you want to use the outputs of a%0A * sophisticated rating predictor somewhere that requires item scorers.%0A *%0A * @since 2.1%0A * @author %3Ca href=%22http://www.grouplens.org%22%3EGroupLens Research%3C/a%3E%0A */%0Apublic class RatingPredictorItemScorer implements ItemScorer %7B%0A    private final RatingPredictor predictor;%0A%0A    @Inject%0A    public RatingPredictorItemScorer(RatingPredictor pred) %7B%0A        predictor = pred;%0A    %7D%0A%0A    @Override%0A    public double score(long user, long item) %7B%0A        return predictor.predict(user, item);%0A    %7D%0A%0A    @Nonnull%0A    @Override%0A    public SparseVector score(long user, @Nonnull Collection%3CLong%3E items) %7B%0A        return predictor.predict(user, items);%0A    %7D%0A%0A    @Override%0A    public void score(long user, @Nonnull MutableSparseVector scores) %7B%0A        predictor.predict(user, scores);%0A    %7D%0A%7D%0A

Implement rating predictor item scorer (#485)