Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing.singlepass
Class RunsMerger.PostingComparator

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

public static class RunsMerger.PostingComparator
extends java.lang.Object
implements java.util.Comparator<RunIterator>, java.io.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
equals, 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 java.util.Comparator<RunIterator>

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow