org.terrier.structures.indexing.singlepass
Class RunsMerger.PostingComparator

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.RunsMerger.PostingComparator
All Implemented Interfaces:
Serializable, Comparator<RunIterator>
Enclosing class:
RunsMerger

public static class RunsMerger.PostingComparator
extends Object
implements Comparator<RunIterator>, Serializable

Implements a comparator for RunIterators (so it can be used by the queue). It decides the next reader by the lexicographical order of the terms in the top elements of the readers.

Author:
Roi Blanco and Craig Macdonald
See Also:
Serialized Form

Constructor Summary
RunsMerger.PostingComparator()
           
 
Method Summary
 int compare(RunIterator a, RunIterator b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

RunsMerger.PostingComparator

public RunsMerger.PostingComparator()
Method Detail

compare

public int compare(RunIterator a,
                   RunIterator b)
Specified by:
compare in interface Comparator<RunIterator>


Terrier 3.6. Copyright © 2004-2011 University of Glasgow