public interface IntervalArray
To create an instance of an IntervalArray, use a IntervalArray.Builder.
Internally, an IntervalArray is backed by a double[] where
a 'row' maps to an index in the backing array.
Note that interval arrays are not intended for use with very high precision data and keys are currently limited to a precision of 4 decimal places. This may change in the future.
IntervalData,
IntervalTable,
IntervalVolume| Modifier and Type | Interface and Description |
|---|---|
static class |
IntervalArray.Builder
A builder of immutable
IntervalArrays. |
static interface |
IntervalArray.Loader
A supplier of values with which to fill an
IntervalArray. |
| Modifier and Type | Method and Description |
|---|---|
double |
get(double rowValue)
Return the value of the bin that maps to the supplied row value.
|
double |
get(int rowIndex)
Return the value of the bin that maps to the supplied row index.
|
int |
maxIndex()
Return the index of the bin with largest value.
|
int |
minIndex()
Return the index of the bin with smallest value.
|
double |
rowMax()
Return the upper edge of the uppermost bin.
|
double |
rowMin()
Return the lower edge of the lowermost bin.
|
List<Double> |
rows()
Return an immutable list view of the row keys (bin centers).
|
double |
rowΔ()
Return the row bin discretization.
|
double |
sum()
Return the sum of the values in this array.
|
XySequence |
values()
Return an immutable view of
this as an XySequence. |
double get(double rowValue)
get(int) by row index.rowValue - of bin to retrieveIndexOutOfBoundsException - if value is out of rangedouble get(int rowIndex)
get(double) by row value.rowIndex - of bin to retrieveIndexOutOfBoundsException - if index is out of rangeXySequence values()
this as an XySequence.double rowMin()
double rowMax()
double rowΔ()
double sum()
int minIndex()
int maxIndex()