|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.indiana.iucbrf.retrieval.RetrievalResults
public class RetrievalResults
A container for an ArrayList of retrieved cases, and difference and rank information. (Note that this class replaces most older functionality related to CaseDifferencePair objects.)
Field Summary | |
---|---|
protected java.util.ArrayList |
caseList
The list of retrieved Case objects. |
protected double[] |
differences
differences[i] is the calculated difference between this.get(i) and the target problem. |
static int |
FULL_DETAIL
|
static int |
HALF_DETAIL
|
protected int |
indexOfEndOfBestTie
The index marking the end of the tie of the best cases. |
protected int |
numDistinctDifferences
A count of the number of differences in these retrieval results that are distinct. |
protected int[] |
ranks
ranks[i] is the rank of the case at this.get(i). |
Constructor Summary | |
---|---|
RetrievalResults()
Construct an empty list of retrieval results. |
|
RetrievalResults(java.util.ArrayList CDPs)
Behaves like the other constructors, but must break down the CaseDifferencePair objects first. |
|
RetrievalResults(java.util.ArrayList cases,
java.util.ArrayList differences)
|
|
RetrievalResults(java.util.ArrayList cases,
double[] differences)
|
Method Summary | |
---|---|
boolean |
areTied(int index1,
int index2)
|
protected void |
calcRanks()
|
java.lang.Object |
clone()
|
Case |
getCase(int index)
|
int |
getCaseCount()
|
java.util.ArrayList |
getCaseList()
|
double |
getDifference(int index)
|
double[] |
getDifferences()
|
int |
getIndexOfEndOfBestTie()
|
int |
getNumCasesInThreshold(double threshold)
|
protected int |
getNumCasesInThresholdBinarySearch(double threshold,
int minID,
int maxID)
|
int |
getNumDistinctDifferences()
|
int |
getRank(int index)
|
int[] |
getRanks()
|
java.util.Iterator |
iterator()
|
static void |
main(java.lang.String[] args)
|
RetrievalResults |
makeSubResults(int fromIndex,
int toIndex)
|
void |
setDifference(int index,
double value)
|
java.lang.String |
toString()
|
java.lang.String |
toString(int detailLevel)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FULL_DETAIL
public static final int HALF_DETAIL
protected java.util.ArrayList caseList
protected double[] differences
protected int numDistinctDifferences
protected int[] ranks
protected int indexOfEndOfBestTie
Constructor Detail |
---|
public RetrievalResults()
public RetrievalResults(java.util.ArrayList CDPs)
CDPs
- An ArrayList of CaseDifferencePair objects.public RetrievalResults(java.util.ArrayList cases, java.util.ArrayList differences)
public RetrievalResults(java.util.ArrayList cases, double[] differences)
Method Detail |
---|
protected void calcRanks()
public boolean areTied(int index1, int index2)
public int getCaseCount()
public java.util.ArrayList getCaseList()
public java.util.Iterator iterator()
public RetrievalResults makeSubResults(int fromIndex, int toIndex)
fromIndex
- int The starting index, inclusivetoIndex
- int The ending index, exclusive
public int getNumCasesInThreshold(double threshold)
protected int getNumCasesInThresholdBinarySearch(double threshold, int minID, int maxID)
public Case getCase(int index)
public double[] getDifferences()
public double getDifference(int index)
index
- The index of the case of interest
public void setDifference(int index, double value)
public int[] getRanks()
public int getNumDistinctDifferences()
public int getIndexOfEndOfBestTie()
public int getRank(int index)
index
- The index of the case of interest
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int detailLevel)
public java.lang.Object clone()
clone
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |