public abstract class NumberColumn<C extends NumberColumn<C,T>,T extends Number> extends AbstractColumn<C,T> implements NumericColumn<T>
| Modifier and Type | Field and Description |
|---|---|
protected it.unimi.dsi.fastutil.ints.IntComparator |
comparator |
protected Locale |
locale |
DEFAULT_ARRAY_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
NumberColumn(ColumnType type,
String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract C |
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 C |
copy()
Returns a deep copy of the receiver
|
int |
countMissing()
Returns the count of missing values in this column
|
protected abstract C |
createCol(String name) |
protected abstract C |
createCol(String name,
int size) |
C |
emptyCopy()
Returns a copy of the receiver with no data.
|
C |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row
size.
|
protected NumberColumnFormatter |
getPrintFormatter() |
String |
getString(int row)
Returns a string representation of the value at the given row.
|
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
|
NumberColumn<C,T> |
set(DoublePredicate condition,
NumberColumn<C,T> other)
Updates this column where values matching the selection are replaced with the corresponding
value from the given column
|
NumberColumn<C,T> |
set(DoublePredicate condition,
T newValue) |
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, filter, first, inRange, last, map, max, min, name, sampleN, sampleX, set, set, setName, sorted, subset, toString, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitallMatch, anyMatch, asDoubleArray, asDoubleColumn, asFloatColumn, asIntColumn, asLongColumn, asShortColumn, asStringColumn, autoCorrelation, autoCorrelation, count, count, eval, eval, geometricMean, getDouble, interpolate, isEmpty, isIn, isIn, isMissing, isNotIn, isNotIn, isNotMissing, kendalls, kurtosis, lag, lead, mapInto, max, max, mean, median, min, min, noneMatch, pctChange, 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, inRange, isMissing, last, map, map, mapInto, max, max, min, min, name, noneMatch, print, reduce, reduce, removeMissing, sampleN, sampleX, set, set, set, set, set, set, setMissing, setMissingTo, 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, cumMax, cumMin, cumProd, cumSum, difference, divide, divide, divide, isMissing, log10, log1p, logN, multiply, multiply, multiply, name, neg, normalize, pctChange, power, power, reciprocal, remainder, 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 Locale locale
protected final it.unimi.dsi.fastutil.ints.IntComparator comparator
protected NumberColumn(ColumnType type, String name)
public NumberColumn<C,T> set(DoublePredicate condition, NumberColumn<C,T> other)
public NumberColumn<C,T> set(DoublePredicate condition, T newValue)
public void setPrintFormatter(NumberFormat format, String missingValueString)
setPrintFormatter in interface NumericColumn<T extends Number>public void setPrintFormatter(NumberColumnFormatter formatter)
setPrintFormatter in interface NumericColumn<T extends Number>protected NumberColumnFormatter getPrintFormatter()
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 C emptyCopy()
Columnpublic C emptyCopy(int rowSize)
Columnpublic abstract C 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 C appendMissing()
ColumnappendMissing in interface Column<T extends Number>public int countMissing()
countMissing in interface Column<T extends Number>Copyright © 2020. All rights reserved.