it.unimi.di.mg4j.search.score
Class DocumentScoreInfo<T>

java.lang.Object
  extended by it.unimi.di.mg4j.search.score.DocumentScoreInfo<T>

public final class DocumentScoreInfo<T>
extends Object

A container used to return scored results with additional information.


Field Summary
 int document
          The index of the document.
static Comparator<DocumentScoreInfo<?>> DOCUMENT_COMPARATOR
          A comparator that sorts DocumentScoreInfo instances by increasing document number.
 T info
          Optional additional information.
 double score
          Its score.
static Comparator<DocumentScoreInfo<?>> SCORE_DOCUMENT_COMPARATOR
          A comparator that sorts DocumentScoreInfo instances by increasing score order and then by decreasing document order.
 
Constructor Summary
DocumentScoreInfo(int document)
           
DocumentScoreInfo(int document, double score)
           
DocumentScoreInfo(int document, double score, T info)
           
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

document

public int document
The index of the document.


score

public double score
Its score.


info

public T info
Optional additional information.


DOCUMENT_COMPARATOR

public static final Comparator<DocumentScoreInfo<?>> DOCUMENT_COMPARATOR
A comparator that sorts DocumentScoreInfo instances by increasing document number.


SCORE_DOCUMENT_COMPARATOR

public static final Comparator<DocumentScoreInfo<?>> SCORE_DOCUMENT_COMPARATOR
A comparator that sorts DocumentScoreInfo instances by increasing score order and then by decreasing document order.

Constructor Detail

DocumentScoreInfo

public DocumentScoreInfo(int document,
                         double score,
                         T info)

DocumentScoreInfo

public DocumentScoreInfo(int document,
                         double score)

DocumentScoreInfo

public DocumentScoreInfo(int document)
Method Detail

toString

public String toString()
Overrides:
toString in class Object