public class FloatColumn extends NumberColumn<FloatColumn,Float>
comparator, locale
DEFAULT_ARRAY_SIZE
Modifier and Type | Method and Description |
---|---|
FloatColumn |
append(Column<Float> column) |
FloatColumn |
append(Column<Float> column,
int row) |
FloatColumn |
append(float i) |
FloatColumn |
append(Float val) |
FloatColumn |
appendCell(String value) |
FloatColumn |
appendCell(String value,
AbstractColumnParser<?> parser) |
FloatColumn |
appendMissing()
Appends a missing value appropriate to the column
|
FloatColumn |
appendObj(Object obj) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
DoubleColumn |
asDoubleColumn()
Returns a new DoubleColumn containing a value for each value in this column.
|
IntColumn |
asIntColumn()
Returns a new IntColumn containing a value for each value in this column, truncating if
necessary.
|
LongColumn |
asLongColumn()
Returns a new LongColumn containing a value for each value in this column, truncating if
necessary
|
Float[] |
asObjectArray() |
ShortColumn |
asShortColumn()
Returns a new IntColumn containing a value for each value in this column, truncating if
necessary.
|
FloatColumn |
bottom(int n)
Returns the smallest ("bottom") n values in the column TODO(lwhite): Consider whether this
should exclude missing
|
void |
clear() |
int |
compare(Float o1,
Float o2) |
FloatColumn |
copy()
Returns a deep copy of the receiver
|
int |
countUnique()
Returns the count of unique values in this column.
|
static FloatColumn |
create(String name) |
static FloatColumn |
create(String name,
float[] arr) |
static FloatColumn |
create(String name,
Float[] arr) |
static FloatColumn |
create(String name,
int initialSize) |
static FloatColumn |
create(String name,
Stream<Float> stream) |
FloatColumn |
createCol(String name) |
FloatColumn |
createCol(String name,
int initialSize) |
Float |
get(int index) |
double |
getDouble(int row) |
float |
getFloat(int row)
Returns a float representation of the data at the given index.
|
String |
getString(int row)
Returns a string representation of the value at the given row.
|
String |
getUnformattedString(int row) |
boolean |
isMissing(int rowNumber) |
boolean |
isMissingValue(float value) |
Iterator<Float> |
iterator() |
FloatColumn |
lag(int n)
Returns a column of the same type and size as the receiver, containing the receivers values
offset by n.
|
FloatColumn |
removeMissing() |
FloatColumn |
set(int row,
Column<Float> column,
int sourceRow) |
FloatColumn |
set(int i,
float val) |
FloatColumn |
set(int i,
Float val) |
Column<Float> |
setMissing(int i) |
int |
size() |
void |
sortAscending() |
void |
sortDescending() |
FloatColumn |
subset(int[] rows) |
FloatColumn |
top(int n)
Returns the largest ("top") n values in the column TODO(lwhite): Consider whether this should
exclude missing
|
FloatColumn |
unique()
Returns a column of the same type as the receiver, containing only the unique values of the
receiver.
|
static boolean |
valueIsMissing(float value) |
byteSize, countMissing, emptyCopy, emptyCopy, getPrintFormatter, rowComparator, set, set, setPrintFormatter, setPrintFormatter
asStringColumn, filter, first, inRange, last, map, max, min, name, sampleN, sampleX, set, set, setName, sorted, toString, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allMatch, anyMatch, asDoubleArray, asFloatColumn, asStringColumn, autoCorrelation, autoCorrelation, count, count, eval, eval, geometricMean, interpolate, isEmpty, isIn, isIn, isMissing, isNotIn, isNotIn, isNotMissing, kendalls, kurtosis, 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, where
allMatch, anyMatch, asList, columnWidth, contains, count, count, filter, first, inRange, last, map, map, mapInto, max, max, min, min, name, noneMatch, print, reduce, reduce, sampleN, sampleX, set, set, set, setMissingTo, setName, sorted, title, type
forEach, spliterator
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
abs, 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, power, reciprocal, remainder, remainder, round, roundInt, sqrt, square, subtract, subtract, subtract
isBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZero
public String getString(int row)
Column
getString
in interface Column<Float>
getString
in class NumberColumn<FloatColumn,Float>
row
- The index of the row.public static FloatColumn create(String name)
public static FloatColumn create(String name, float[] arr)
public static FloatColumn create(String name, int initialSize)
public static FloatColumn create(String name, Float[] arr)
public static FloatColumn create(String name, Stream<Float> stream)
public FloatColumn createCol(String name, int initialSize)
createCol
in class NumberColumn<FloatColumn,Float>
public FloatColumn createCol(String name)
createCol
in class NumberColumn<FloatColumn,Float>
public Float get(int index)
public static boolean valueIsMissing(float value)
public FloatColumn subset(int[] rows)
subset
in interface Column<Float>
subset
in class AbstractColumn<FloatColumn,Float>
public int size()
public void clear()
public FloatColumn unique()
Column
Column
public FloatColumn top(int n)
NumberColumn
top
in class NumberColumn<FloatColumn,Float>
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 FloatColumn bottom(int n)
NumberColumn
bottom
in class NumberColumn<FloatColumn,Float>
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 FloatColumn lag(int n)
Column
For example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
public FloatColumn removeMissing()
public FloatColumn append(float i)
public FloatColumn append(Float val)
public FloatColumn copy()
Column
copy
in interface NumericColumn<Float>
copy
in interface Column<Float>
copy
in class NumberColumn<FloatColumn,Float>
Column
public Float[] asObjectArray()
public FloatColumn set(int i, Float val)
public FloatColumn set(int i, float val)
public FloatColumn append(Column<Float> column)
public FloatColumn append(Column<Float> column, int row)
public FloatColumn set(int row, Column<Float> column, int sourceRow)
public byte[] asBytes(int rowNumber)
NumberColumn
asBytes
in interface Column<Float>
asBytes
in class NumberColumn<FloatColumn,Float>
rowNumber
- index of the rowpublic int countUnique()
Column
public double getDouble(int row)
public float getFloat(int row)
ClassCastException
- if the value can't be cast to ta floatpublic boolean isMissingValue(float value)
public boolean isMissing(int rowNumber)
public void sortAscending()
public void sortDescending()
public FloatColumn appendMissing()
Column
appendMissing
in interface Column<Float>
appendMissing
in class NumberColumn<FloatColumn,Float>
public FloatColumn appendObj(Object obj)
public FloatColumn appendCell(String value)
public FloatColumn appendCell(String value, AbstractColumnParser<?> parser)
public String getUnformattedString(int row)
public LongColumn asLongColumn()
A narrowing primitive conversion such as this one may lose information about the overall magnitude of a numeric value and may also lose precision and range. Specifically, if the value is too small (a negative value of large magnitude or negative infinity), the result is the smallest representable value of type long.
Similarly, if the value is too large (a positive value of large magnitude or positive infinity), the result is the largest representable value of type long.
Despite the fact that overflow, underflow, or other loss of information may occur, a narrowing primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
public IntColumn asIntColumn()
A narrowing primitive conversion such as this one may lose information about the overall magnitude of a numeric value and may also lose precision and range. Specifically, if the value is too small (a negative value of large magnitude or negative infinity), the result is the smallest representable value of type int.
Similarly, if the value is too large (a positive value of large magnitude or positive infinity), the result is the largest representable value of type int.
Despite the fact that overflow, underflow, or other loss of information may occur, a narrowing primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
public ShortColumn asShortColumn()
A narrowing primitive conversion such as this one may lose information about the overall magnitude of a numeric value and may also lose precision and range. Specifically, if the value is too small (a negative value of large magnitude or negative infinity), the result is the smallest representable value of type int.
Similarly, if the value is too large (a positive value of large magnitude or positive infinity), the result is the largest representable value of type int.
Despite the fact that overflow, underflow, or other loss of information may occur, a narrowing primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
public DoubleColumn asDoubleColumn()
No information is lost in converting from the floats to doubles
A missing value in the receiver is converted to a missing value in the result
Copyright © 2020. All rights reserved.