org.terrier.structures
Class InvertedIndexInputStream

java.lang.Object
  extended by org.terrier.structures.BitPostingIndexInputStream
      extended by org.terrier.structures.InvertedIndexInputStream
All Implemented Interfaces:
java.io.Closeable, java.util.Iterator<IterablePosting>, PostingIndexInputStream, Skipable
Direct Known Subclasses:
BlockInvertedIndexInputStream

public class InvertedIndexInputStream
extends BitPostingIndexInputStream

Reads an InvertedIndex as a stream

Since:
2.0
Author:
Craig Macdonald

Field Summary
 
Fields inherited from class org.terrier.structures.BitPostingIndexInputStream
currentEntryCount, currentFile, currentPointer, doi, entriesSkipped, fieldCount, file, fileCount, index, logger, pointerList, postingConstructor, postingIteratorClass, structureName
 
Constructor Summary
InvertedIndexInputStream(Index _index, java.lang.String structureName)
          Construct an instance of the class with
InvertedIndexInputStream(Index _index, java.lang.String structureName, java.lang.Class<? extends IterablePosting> _postingIteratorClass)
          Construct an instance of the class with
InvertedIndexInputStream(Index _index, java.lang.String structureName, java.util.Iterator<? extends Pointer> lexInputStream)
          Construct an instance of the class with
InvertedIndexInputStream(Index _index, java.lang.String structureName, java.util.Iterator<? extends Pointer> lexInputStream, java.lang.Class<? extends IterablePosting> _postingIteratorClass)
          Construct an instance of the class with
 
Method Summary
 int[][] getNextDocuments()
          Get the set of documents for the next term
protected  int[][] getNextDocuments(BitIndexPointer pointer)
          Get the set of documents for the given term pointer
 
Methods inherited from class org.terrier.structures.BitPostingIndexInputStream
_next, close, getCurrentPointer, getDocumentIndex, getEntriesSkipped, getFilename, getFilename, getNextPostings, getNumberOfCurrentPostings, getPos, hasNext, loadPostingIterator, next, print, remove, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvertedIndexInputStream

public InvertedIndexInputStream(Index _index,
                                java.lang.String structureName)
                         throws java.io.IOException
Construct an instance of the class with

Parameters:
_index -
structureName -
Throws:
java.io.IOException

InvertedIndexInputStream

public InvertedIndexInputStream(Index _index,
                                java.lang.String structureName,
                                java.util.Iterator<? extends Pointer> lexInputStream)
                         throws java.io.IOException
Construct an instance of the class with

Parameters:
_index -
structureName -
lexInputStream -
Throws:
java.io.IOException

InvertedIndexInputStream

public InvertedIndexInputStream(Index _index,
                                java.lang.String structureName,
                                java.util.Iterator<? extends Pointer> lexInputStream,
                                java.lang.Class<? extends IterablePosting> _postingIteratorClass)
                         throws java.io.IOException
Construct an instance of the class with

Parameters:
_index -
structureName -
lexInputStream -
_postingIteratorClass -
Throws:
java.io.IOException

InvertedIndexInputStream

public InvertedIndexInputStream(Index _index,
                                java.lang.String structureName,
                                java.lang.Class<? extends IterablePosting> _postingIteratorClass)
                         throws java.io.IOException
Construct an instance of the class with

Parameters:
_index -
structureName -
_postingIteratorClass -
Throws:
java.io.IOException
Method Detail

getNextDocuments

public int[][] getNextDocuments()
                         throws java.io.IOException
Get the set of documents for the next term

Throws:
java.io.IOException

getNextDocuments

protected int[][] getNextDocuments(BitIndexPointer pointer)
                            throws java.io.IOException
Get the set of documents for the given term pointer

Parameters:
pointer - for the number of documents
Returns:
the integer form of the postings
Throws:
java.io.IOException


Terrier 3.5. Copyright © 2004-2011 University of Glasgow