Constructor and Description |
---|
SRResultList(int maxNumDocs) |
Modifier and Type | Method and Description |
---|---|
gnu.trove.map.TIntFloatMap |
asTroveMap()
Returns this list as a TIntFloatMap.
|
SRResult |
get(int i)
Returns the SRResult at the specified index.
|
int |
getId(int i)
Returns the ID of the specified index.
|
int[] |
getIds()
Returns an array of the IDs in this list.
|
int |
getIndexForId(int id)
Returns the index of the specified ID, or -1 if not found.
|
double |
getMissingScore()
Returns the estimated similarity score for missing documents.
|
double |
getScore(int i)
Returns the score of the specified index.
|
double |
getScoreForId(int id)
Returns the score for the specified ID, or Double.NaN if not found.
|
double[] |
getScores()
Returns an array of scores in this list.
|
float[] |
getScoresAsFloat()
Returns an array of scores in this list as float values.
|
Iterator<SRResult> |
iterator() |
void |
makeUnitLength()
Normalizes the score vector of this list to a unit length.
|
double |
maxScore() |
double |
minScore() |
int |
numDocs()
Returns the specified number of docs in this list.
|
void |
set(int i,
int id,
double score)
Sets the ID and score of the SRResult at the index.
|
void |
set(int i,
int id,
double score,
List<Explanation> explanationList)
Sets the ID, score, and explanations of the SRResult at the index.
|
void |
set(int i,
SRResult result)
Sets the SRResut at the index to the new SRResult.
|
void |
setMissingRank(int missingRank) |
void |
setMissingScore(double missingScore)
Sets the estimated similarity score for missing documents
|
void |
sortAscending()
Sorts the SRResults in this list in ascending order.
|
void |
sortById()
Sorts by id, ascending.
|
void |
sortDescending()
Sorts the SRResults in this list in descending order.
|
void |
truncate(int numDocs)
Truncates the list to the specified size.
|
public double minScore()
public double maxScore()
public int numDocs()
public void truncate(int numDocs)
numDocs
- public int getIndexForId(int id)
id
- public double getScoreForId(int id)
id
- public int getId(int i)
i
- public int[] getIds()
public double getScore(int i)
i
- public double[] getScores()
public float[] getScoresAsFloat()
public void set(int i, int id, double score)
i
- id
- score
- public void set(int i, SRResult result)
i
- result
- public void set(int i, int id, double score, List<Explanation> explanationList)
i
- id
- score
- explanationList
- public gnu.trove.map.TIntFloatMap asTroveMap()
public void makeUnitLength()
public void sortAscending()
public void sortDescending()
public void sortById()
public SRResult get(int i)
i
- public double getMissingScore()
public void setMissingScore(double missingScore)
missingScore
- public void setMissingRank(int missingRank)
Copyright © 2014. All rights reserved.