iglu.ir
Class AbstractIRPacket

java.lang.Object
  |
  +--iglu.ir.AbstractIRPacket
All Implemented Interfaces:
IRPacket
Direct Known Subclasses:
DefaultIRPacket

public abstract class AbstractIRPacket
extends java.lang.Object
implements IRPacket

Provides some implementation independent utility methods for IRPackets.

Author:
Travis Bauer

Constructor Summary
AbstractIRPacket()
           
 
Method Summary
 java.lang.String[] allQueryTerms()
          Return an array of all the terms occurring in the the queries.
 int[] docsForQuery(int queryNum, int num)
          Given a query number (index into array returned by allQueries()), return an index into the document set of all the documents which should be retrieved for the given query.
 int[] relatedDocs(int docNum)
          Given an index into the document set, return all the documents that are "related" to that document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface iglu.ir.IRPacket
allQueries, documentSet, queryToDocMapping
 

Constructor Detail

AbstractIRPacket

public AbstractIRPacket()
Method Detail

docsForQuery

public int[] docsForQuery(int queryNum,
                          int num)
Description copied from interface: IRPacket
Given a query number (index into array returned by allQueries()), return an index into the document set of all the documents which should be retrieved for the given query.

Specified by:
docsForQuery in interface IRPacket

relatedDocs

public int[] relatedDocs(int docNum)
Description copied from interface: IRPacket
Given an index into the document set, return all the documents that are "related" to that document. What "related" means in up to the particular implementation.

Specified by:
relatedDocs in interface IRPacket

allQueryTerms

public java.lang.String[] allQueryTerms()
Description copied from interface: IRPacket
Return an array of all the terms occurring in the the queries.

Specified by:
allQueryTerms in interface IRPacket