Class AbstractFastUpdateableRecommender<U,​I>

java.lang.Object
es.uam.eps.ir.ranksys.rec.AbstractRecommender<U,​I>
es.uam.eps.ir.relison.links.recommendation.updateable.fast.AbstractFastUpdateableRecommender<U,​I>
Type Parameters:
U - type of the users.
I - type of the items.
All Implemented Interfaces:
es.uam.eps.ir.ranksys.core.index.ItemIndex<I>, es.uam.eps.ir.ranksys.core.index.UserIndex<U>, es.uam.eps.ir.ranksys.fast.index.FastItemIndex<I>, es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>, es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,​I>, es.uam.eps.ir.ranksys.rec.Recommender<U,​I>, FastUpdateableRecommender<U,​I>, UpdateableRecommender<U,​I>
Direct Known Subclasses:
FastUpdateableRankingRecommender, MFGraphUpdateableRecommender, MFUpdateableRecommender

public abstract class AbstractFastUpdateableRecommender<U,​I>
extends es.uam.eps.ir.ranksys.rec.AbstractRecommender<U,​I>
implements FastUpdateableRecommender<U,​I>
Abstract (fast) updateable recommender. It implements the free and candidate-based recommendation methods as variants of the filter recommendation.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected FastUpdateablePreferenceData<U,​I> prefData
    Fast preference data.
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractFastUpdateableRecommender​(FastUpdateablePreferenceData<U,​I> prefData)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx)  
    es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, int maxLength)  
    abstract es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, int maxLength, java.util.function.IntPredicate filter)  
    es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, java.util.function.IntPredicate filter)  
    es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, java.util.stream.IntStream candidates)  
    es.uam.eps.ir.ranksys.core.Recommendation<U,​I> getRecommendation​(U u, int maxLength)  
    es.uam.eps.ir.ranksys.core.Recommendation<U,​I> getRecommendation​(U u, int maxLength, java.util.function.Predicate<I> filter)  
    es.uam.eps.ir.ranksys.core.Recommendation<U,​I> getRecommendation​(U u, java.util.stream.Stream<I> candidates)  
    I iidx2item​(int iidx)  
    int item2iidx​(I i)  
    int numItems()  
    int numUsers()  
    U uidx2user​(int uidx)  
    int user2uidx​(U u)  

    Methods inherited from class es.uam.eps.ir.ranksys.rec.AbstractRecommender

    getRecommendation, getRecommendation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastItemIndex

    containsItem, getAllIidx, getAllItems, iidx2item, iidx2item, item2iidx, item2iidx

    Methods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex

    containsUser, getAllUidx, getAllUsers, uidx2user, uidx2user, user2uidx, user2uidx

    Methods inherited from interface es.uam.eps.ir.ranksys.rec.Recommender

    getRecommendation, getRecommendation

    Methods inherited from interface es.uam.eps.ir.relison.links.recommendation.updateable.UpdateableRecommender

    update, update, updateAddItem, updateAddUser, updateDelete, updateDelete
  • Field Details

  • Constructor Details

  • Method Details

    • numUsers

      public int numUsers()
      Specified by:
      numUsers in interface es.uam.eps.ir.ranksys.core.index.UserIndex<U>
    • user2uidx

      public int user2uidx​(U u)
      Specified by:
      user2uidx in interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
    • uidx2user

      public U uidx2user​(int uidx)
      Specified by:
      uidx2user in interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
    • numItems

      public int numItems()
      Specified by:
      numItems in interface es.uam.eps.ir.ranksys.core.index.ItemIndex<U>
    • item2iidx

      public int item2iidx​(I i)
      Specified by:
      item2iidx in interface es.uam.eps.ir.ranksys.fast.index.FastItemIndex<U>
    • iidx2item

      public I iidx2item​(int iidx)
      Specified by:
      iidx2item in interface es.uam.eps.ir.ranksys.fast.index.FastItemIndex<U>
    • getRecommendation

      public es.uam.eps.ir.ranksys.core.Recommendation<U,​I> getRecommendation​(U u, int maxLength)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.Recommender<U,​I>
      Overrides:
      getRecommendation in class es.uam.eps.ir.ranksys.rec.AbstractRecommender<U,​I>
    • getRecommendation

      public es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,​I>
    • getRecommendation

      public es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, int maxLength)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,​I>
    • getRecommendation

      public es.uam.eps.ir.ranksys.core.Recommendation<U,​I> getRecommendation​(U u, int maxLength, java.util.function.Predicate<I> filter)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.Recommender<U,​I>
      Specified by:
      getRecommendation in class es.uam.eps.ir.ranksys.rec.AbstractRecommender<U,​I>
    • getRecommendation

      public es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, java.util.function.IntPredicate filter)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,​I>
    • getRecommendation

      public abstract es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, int maxLength, java.util.function.IntPredicate filter)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,​I>
    • getRecommendation

      public es.uam.eps.ir.ranksys.core.Recommendation<U,​I> getRecommendation​(U u, java.util.stream.Stream<I> candidates)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.Recommender<U,​I>
      Overrides:
      getRecommendation in class es.uam.eps.ir.ranksys.rec.AbstractRecommender<U,​I>
    • getRecommendation

      public es.uam.eps.ir.ranksys.fast.FastRecommendation getRecommendation​(int uidx, java.util.stream.IntStream candidates)
      Specified by:
      getRecommendation in interface es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,​I>