public interface Index
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_AEE
Composite flag for an ascending, left and right exclusive range.
|
static int |
TYPE_AEI
Composite flag for an ascending, left exclusive, right inclusive
range.
|
static int |
TYPE_AIE
Composite flag for an ascending, left inclusive, right exclusive
range.
|
static int |
TYPE_AII
Composite flag for an ascending, left and right inclusive range.
|
static int |
TYPE_ASCENDING
Flag for an ascending sort order.
|
static int |
TYPE_DEE
Composite flag for a descending, left and right exclusive range.
|
static int |
TYPE_DEI
Composite flag for a descending, left exclusive, right inclusive
range.
|
static int |
TYPE_DESCENDING
Flag for a descending sort order.
|
static int |
TYPE_DIE
Composite flag for a descending, left inclusive, right exclusive
range.
|
static int |
TYPE_DII
Composite flag for a descending, left and right inclusive range.
|
static int |
TYPE_LEFT_EXCLUSIVE
Flag for excluding the lowest value of a range.
|
static int |
TYPE_LEFT_INCLUSIVE
Flag for including the lowest value of a range.
|
static int |
TYPE_RIGHT_EXCLUSIVE
Flag for excluding the highest value of a range.
|
static int |
TYPE_RIGHT_INCLUSIVE
Flag for including the highest value of a range.
|
Modifier and Type | Method and Description |
---|---|
IntIterator |
allRows(int type)
Get an iterator over all rows in the index, in sorted order.
|
void |
dispose()
Dispose of an index, deregistering all listeners.
|
int |
get(double x)
Get the first row found with the given data value.
|
int |
get(float x)
Get the first row found with the given data value.
|
int |
get(int x)
Get the first row found with the given data value.
|
int |
get(long x)
Get the first row found with the given data value.
|
int |
get(java.lang.Object x)
Get the first row found with the given data value.
|
java.util.Comparator |
getComparator()
Get the comparator used to compare column data values.
|
void |
index()
Perform an initial indexing of a data column.
|
int |
maximum()
Get the row (or one of the rows) with the maximum data value.
|
int |
median()
Get the row (or one of the rows) with the median data value.
|
int |
minimum()
Get the row (or one of the rows) with the minimum data value.
|
IntIterator |
rows(boolean val)
Get an iterator over all rows with the given data value.
|
IntIterator |
rows(double val)
Get an iterator over all rows with the given data value.
|
IntIterator |
rows(double lo,
double hi,
int type)
Get an iterator over a sorted range of rows.
|
IntIterator |
rows(float val)
Get an iterator over all rows with the given data value.
|
IntIterator |
rows(float lo,
float hi,
int type)
Get an iterator over a sorted range of rows.
|
IntIterator |
rows(int val)
Get an iterator over all rows with the given data value.
|
IntIterator |
rows(int lo,
int hi,
int type)
Get an iterator over a sorted range of rows.
|
IntIterator |
rows(long val)
Get an iterator over all rows with the given data value.
|
IntIterator |
rows(long lo,
long hi,
int type)
Get an iterator over a sorted range of rows.
|
IntIterator |
rows(java.lang.Object val)
Get an iterator over all rows with the given data value.
|
IntIterator |
rows(java.lang.Object lo,
java.lang.Object hi,
int type)
Get an iterator over a sorted range of rows.
|
int |
size()
Get the size of this index, the number of data value / row
pairs included.
|
int |
uniqueCount()
Get the number of unique data values in the index.
|
static final int TYPE_ASCENDING
static final int TYPE_DESCENDING
static final int TYPE_LEFT_INCLUSIVE
static final int TYPE_LEFT_EXCLUSIVE
static final int TYPE_RIGHT_INCLUSIVE
static final int TYPE_RIGHT_EXCLUSIVE
static final int TYPE_AII
static final int TYPE_DII
static final int TYPE_AEI
static final int TYPE_DEI
static final int TYPE_AIE
static final int TYPE_DIE
static final int TYPE_AEE
static final int TYPE_DEE
void index()
void dispose()
java.util.Comparator getComparator()
int minimum()
int maximum()
int median()
int uniqueCount()
int size()
IntIterator allRows(int type)
type
- the sort type, one of TYPE_ASCENDING
or
TYPE_DESCENDING
.IntIterator rows(java.lang.Object lo, java.lang.Object hi, int type)
lo
- the minimum data valuehi
- the maximum data valuetype
- the iteration type, one of the composite flags
involving both a sort order, and whether each bound of
the range should inclusive or exclusiveIntIterator rows(int lo, int hi, int type)
lo
- the minimum data valuehi
- the maximum data valuetype
- the iteration type, one of the composite flags
involving both a sort order, and whether each bound of
the range should inclusive or exclusiveIntIterator rows(long lo, long hi, int type)
lo
- the minimum data valuehi
- the maximum data valuetype
- the iteration type, one of the composite flags
involving both a sort order, and whether each bound of
the range should inclusive or exclusiveIntIterator rows(float lo, float hi, int type)
lo
- the minimum data valuehi
- the maximum data valuetype
- the iteration type, one of the composite flags
involving both a sort order, and whether each bound of
the range should inclusive or exclusiveIntIterator rows(double lo, double hi, int type)
lo
- the minimum data valuehi
- the maximum data valuetype
- the iteration type, one of the composite flags
involving both a sort order, and whether each bound of
the range should inclusive or exclusiveIntIterator rows(java.lang.Object val)
val
- the data valueIntIterator rows(int val)
val
- the data valueIntIterator rows(long val)
val
- the data valueIntIterator rows(float val)
val
- the data valueIntIterator rows(double val)
val
- the data valueIntIterator rows(boolean val)
val
- the data valueint get(java.lang.Object x)
x
- the data valueint get(int x)
x
- the data valueint get(long x)
x
- the data valueint get(float x)
x
- the data valueint get(double x)
x
- the data valueCopyright ? 2013 Regents of the University of California