public abstract class NumberColumn<T extends Number> extends AbstractColumn<T> implements NumericColumn<T>
| Modifier and Type | Field and Description |
|---|---|
protected it.unimi.dsi.fastutil.ints.IntComparator |
comparator |
protected Locale |
locale |
protected NumberColumnFormatter |
printFormatter |
DEFAULT_ARRAY_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
NumberColumn(ColumnType type,
String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allMatch(DoublePredicate test)
Returns true if all rows satisfy the predicate, false otherwise
|
boolean |
anyMatch(DoublePredicate test)
Returns true if any row satisfies the predicate, false otherwise
|
abstract NumberColumn<T> |
appendMissing()
Appends a missing value appropriate to the column
|
abstract byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
abstract NumericColumn<T> |
bottom(int n)
Returns the smallest ("bottom") n values in the column
TODO(lwhite): Consider whether this should exclude missing
|
int |
byteSize()
Returns the width of a cell in this column, in bytes.
|
abstract NumberColumn<T> |
copy()
Returns a deep copy of the receiver
|
int |
countMissing()
Returns the count of missing values in this column
|
protected abstract NumberColumn<T> |
createCol(String name) |
protected abstract NumberColumn<T> |
createCol(String name,
int size) |
NumberColumn<T> |
emptyCopy()
Returns a copy of the receiver with no data.
|
NumberColumn<T> |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size.
|
String |
getString(int row)
Returns a string representation of the value at the given row.
|
NumberColumn<T> |
inRange(int start,
int end)
Returns a column containing the rows in this column beginning with start inclusive, and ending with end exclusive
|
boolean |
noneMatch(DoublePredicate test)
Returns true if no row satisfies the predicate, false otherwise
|
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator()
Compares the given ints, which refer to the indexes of the doubles in this column, according to the values of the
doubles themselves
|
void |
setPrintFormatter(NumberColumnFormatter formatter) |
void |
setPrintFormatter(NumberFormat format,
String missingValueString) |
abstract NumericColumn<T> |
top(int n)
Returns the largest ("top") n values in the column
TODO(lwhite): Consider whether this should exclude missing
|
asStringColumn, name, setName, toString, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasDoubleArray, asDoubleColumn, asFloatColumn, asIntColumn, asLongColumn, asShortColumn, asStringColumn, count, count, eval, eval, eval, eval, eval, geometricMean, getDouble, isEmpty, isIn, isIn, isMissing, isNotIn, isNotIn, isNotMissing, kendalls, kurtosis, lag, lead, mapInto, max, max, mean, median, min, min, pearsons, percentile, populationVariance, product, quadraticMean, quartile1, quartile3, range, reduce, reduce, rolling, skewness, spearmans, standardDeviation, stats, sum, summarize, summary, sumOfLogs, sumOfSquares, variance, whereallMatch, anyMatch, append, append, append, appendCell, appendCell, appendObj, asList, asObjectArray, clear, columnWidth, contains, count, count, countUnique, filter, first, get, getUnformattedString, isMissing, last, map, mapInto, max, max, min, min, name, noneMatch, print, reduce, reduce, removeMissing, sampleN, sampleX, set, set, set, set, setMissing, setName, size, sortAscending, sortDescending, sorted, subset, title, type, uniqueforEach, iterator, spliteratorcompare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongabs, add, add, add, asPercent, asRatio, bin, cube, cubeRoot, cumProd, cumSum, difference, divide, divide, divide, log10, log1p, logN, multiply, multiply, multiply, name, neg, normalize, pctChange, power, remainder, round, roundInt, size, sqrt, square, subtract, subtract, subtractisBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZero, sizeprotected NumberColumnFormatter printFormatter
protected Locale locale
protected final it.unimi.dsi.fastutil.ints.IntComparator comparator
protected NumberColumn(ColumnType type, String name)
protected abstract NumberColumn<T> createCol(String name, int size)
protected abstract NumberColumn<T> createCol(String name)
public void setPrintFormatter(NumberFormat format, String missingValueString)
public void setPrintFormatter(NumberColumnFormatter formatter)
public abstract NumericColumn<T> top(int n)
n - The maximum number of records to return. The actual number will be smaller if n is greater than the
number of observations in the columnpublic abstract NumericColumn<T> bottom(int n)
n - The maximum number of records to return. The actual number will be smaller if n is greater than the
number of observations in the columnpublic String getString(int row)
Columnpublic NumberColumn<T> inRange(int start, int end)
Columnpublic NumberColumn<T> emptyCopy()
Columnpublic NumberColumn<T> emptyCopy(int rowSize)
Columnpublic abstract NumberColumn<T> copy()
Columnpublic it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Column<T extends Number>public int byteSize()
Columnpublic abstract byte[] asBytes(int rowNumber)
public abstract NumberColumn<T> appendMissing()
ColumnappendMissing in interface Column<T extends Number>public int countMissing()
countMissing in interface Column<T extends Number>public boolean allMatch(DoublePredicate test)
test - the predicatepublic boolean anyMatch(DoublePredicate test)
test - the predicatepublic boolean noneMatch(DoublePredicate test)
test - the predicateCopyright © 2019. All rights reserved.