private static final class SortingLeafReader.SortingDocsEnum.DocFreqSorter extends TimSorter
| Modifier and Type | Field and Description |
|---|---|
private int[] |
docs |
private int[] |
freqs |
private int[] |
tmpDocs |
private int[] |
tmpFreqs |
| Constructor and Description |
|---|
DocFreqSorter(int maxDoc) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compare(int i,
int j)
Compare entries found in slots
i and j. |
protected int |
compareSaved(int i,
int j)
Compare element
i from the temporary storage with element
j from the slice to sort, similarly to
Sorter.compare(int, int). |
protected void |
copy(int src,
int dest)
Copy data from slot
src to slot dest. |
void |
reset(int[] docs,
int[] freqs) |
protected void |
restore(int i,
int j)
Restore element
j from the temporary storage into slot i. |
protected void |
save(int i,
int len)
Save all elements between slots
i and i+len
into the temporary storage. |
protected void |
swap(int i,
int j)
Swap values at slots
i and j. |
comparePivot, setPivotprivate int[] docs
private int[] freqs
private final int[] tmpDocs
private int[] tmpFreqs
public void reset(int[] docs,
int[] freqs)
protected int compare(int i,
int j)
Sorteri and j.
The contract for the returned value is the same as
Comparator.compare(Object, Object).protected void swap(int i,
int j)
Sorteri and j.protected void copy(int src,
int dest)
TimSortersrc to slot dest.protected void save(int i,
int len)
TimSorteri and i+len
into the temporary storage.protected void restore(int i,
int j)
TimSorterj from the temporary storage into slot i.protected int compareSaved(int i,
int j)
TimSorteri from the temporary storage with element
j from the slice to sort, similarly to
Sorter.compare(int, int).compareSaved in class TimSorter