Class RandomFiller<U,I>
java.lang.Object
es.uam.eps.ir.relison.links.recommendation.filler.AbstractFastFiller<U,I>
es.uam.eps.ir.relison.links.recommendation.filler.RandomFiller<U,I>
- Type Parameters:
U- type of the users.I- type of the items.
- All Implemented Interfaces:
FastFiller<U,I>,Filler<U,I>
public class RandomFiller<U,I> extends AbstractFastFiller<U,I>
Filler that completes ranking with random recommendation.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.Integer>orderA list containing the selected order for the items.private java.util.RandomrngRandom number generator.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.filler.AbstractFastFiller
prefData -
Constructor Summary
Constructors Constructor Description RandomFiller(es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,I> prefData)Constructor.RandomFiller(es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,I> prefData, long seed)Constructor. -
Method Summary
Modifier and Type Method Description java.util.stream.IntStreamfillerList(int uidx)Returns a list with the identifiers of the items.java.util.stream.Stream<I>fillerList(U u)Obtains the filler list for a given user.protected voidresetMethod()Resets the variables corresponding to the filler.
-
Field Details
-
Constructor Details
-
RandomFiller
public RandomFiller(es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,I> prefData, long seed)Constructor.- Parameters:
prefData- preference data.seed- random number generator seed.
-
RandomFiller
Constructor.- Parameters:
prefData- preference data.
-
-
Method Details
-
resetMethod
protected void resetMethod()Description copied from class:AbstractFastFillerResets the variables corresponding to the filler.- Specified by:
resetMethodin classAbstractFastFiller<U,I>
-
fillerList
public java.util.stream.IntStream fillerList(int uidx)Description copied from interface:FastFillerReturns a list with the identifiers of the items.- Parameters:
uidx- the identifier of the user.- Returns:
- a stream with the identifiers of the items used to fill lists for the user uidx
-
fillerList
Description copied from interface:FillerObtains the filler list for a given user.- Parameters:
u- the user.- Returns:
- a stream containing the filler list for the user.
-