Class FastGraphIndex<U>

java.lang.Object
es.uam.eps.ir.relison.links.data.FastGraphIndex<U>
Type Parameters:
U - Type of the users.
All Implemented Interfaces:
es.uam.eps.ir.ranksys.core.index.ItemIndex<U>, es.uam.eps.ir.ranksys.core.index.UserIndex<U>, es.uam.eps.ir.ranksys.fast.index.FastItemIndex<U>, es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>, GraphIndex<U>

public class FastGraphIndex<U>
extends java.lang.Object
implements GraphIndex<U>
Class that represents both user and item indexes for a graph.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private Index<U> index
    User index.
  • Constructor Summary

    Constructors 
    Constructor Description
    FastGraphIndex​(FastGraph<U> graph)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    boolean containsUser​(U u)  
    java.util.stream.Stream<U> getAllUsers()  
    int item2iidx​(U i)  
    int numUsers()  
    U uidx2user​(int i)  
    int user2uidx​(U u)  

    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

    getAllIidx, iidx2item, iidx2item, item2iidx, item2iidx

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

    getAllUidx, uidx2user, uidx2user, user2uidx, user2uidx

    Methods inherited from interface es.uam.eps.ir.relison.links.data.GraphIndex

    containsItem, getAllItems, iidx2item, numItems
  • Field Details

  • Constructor Details

    • FastGraphIndex

      public FastGraphIndex​(FastGraph<U> graph)
      Constructor. Extracts the information from a FastGraph.
      Parameters:
      graph - the graph.
  • Method Details

    • 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 i)
      Specified by:
      uidx2user in interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
    • containsUser

      public boolean containsUser​(U u)
      Specified by:
      containsUser in interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
      Specified by:
      containsUser in interface es.uam.eps.ir.ranksys.core.index.UserIndex<U>
    • numUsers

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

      public java.util.stream.Stream<U> getAllUsers()
      Specified by:
      getAllUsers in interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
      Specified by:
      getAllUsers in interface es.uam.eps.ir.ranksys.core.index.UserIndex<U>
    • item2iidx

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