Class SparseVectorDocumentMapper

  • All Implemented Interfaces:
    InvertedIndex.DocumentMapper<de.jungblut.math.DoubleVector,​java.lang.Integer>

    public final class SparseVectorDocumentMapper
    extends java.lang.Object
    implements InvertedIndex.DocumentMapper<de.jungblut.math.DoubleVector,​java.lang.Integer>
    Mapper that maps sparse vectors into a set of their indices so they can be used in the InvertedIndex for fast lookup.
    Author:
    thomas.jungblut
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.Integer> mapDocument​(de.jungblut.math.DoubleVector v)
      Maps the document into its smaller parts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SparseVectorDocumentMapper

        public SparseVectorDocumentMapper()
    • Method Detail

      • mapDocument

        public java.util.Set<java.lang.Integer> mapDocument​(de.jungblut.math.DoubleVector v)
        Description copied from interface: InvertedIndex.DocumentMapper
        Maps the document into its smaller parts.
        Specified by:
        mapDocument in interface InvertedIndex.DocumentMapper<de.jungblut.math.DoubleVector,​java.lang.Integer>
        Parameters:
        v - the document to map.
        Returns:
        a set of keys that this document consists of.