Iterable<Float>
, Comparator<Float>
, NumericColumn<Float>
, Column<Float>
, NumberFilters
, NumberMapFunctions
, FilterSpec<Float>
, NumberFilterSpec<Float>
public class FloatColumn extends NumberColumn<FloatColumn,Float>
Modifier and Type | Field | Description |
---|---|---|
protected it.unimi.dsi.fastutil.floats.FloatArrayList |
data |
DEFAULT_ARRAY_SIZE
comparator, locale
Modifier and Type | Method | Description |
---|---|---|
FloatColumn |
append(float i) |
|
FloatColumn |
append(Float val) |
Appends value to the bottom of this column and return this column
|
FloatColumn |
append(Column<Float> column) |
Appends all the values in the argument to the bottom of this column and return this column
|
FloatColumn |
append(Column<Float> column,
int row) |
Appends the value at the given row in the given column to the bottom of this column and return
this column
|
FloatColumn |
appendCell(String value) |
Add one element to the bottom of this column and set its value to the parsed value of the given
String.
|
FloatColumn |
appendCell(String value,
AbstractColumnParser<?> parser) |
Add one element to the bottom of this column and set its value to the parsed value of the given
String, as performed by the given parser
|
FloatColumn |
appendMissing() |
Appends a missing value appropriate to the column
|
FloatColumn |
appendObj(Object obj) |
Appends the given value to the bottom of this column and return this column
|
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.
|
float[] |
asFloatArray() |
|
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() |
Returns an array of objects as appropriate for my type of column
|
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() |
Removes all elements TODO: Make this return this column
|
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,
int initialSize) |
|
static FloatColumn |
create(String name,
Float[] arr) |
|
static FloatColumn |
create(String name,
Stream<Float> stream) |
|
FloatColumn |
createCol(String name) |
|
FloatColumn |
createCol(String name,
int initialSize) |
|
Float |
get(int index) |
Returns the value at the given zero-based 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) |
Returns a String representation of the value at index r, without any formatting applied
|
Selection |
isIn(float... numbers) |
|
boolean |
isMissing(int rowNumber) |
Returns true if the value at rowNumber is missing
|
boolean |
isMissingValue(float value) |
|
Selection |
isNotIn(float... numbers) |
|
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() |
Returns a copy of this column with the missing values removed
|
FloatColumn |
set(int i,
float val) |
|
FloatColumn |
set(int i,
Float val) |
Sets the value at index row to the given value and return this column
|
Column<Float> |
set(int row,
String stringValue,
AbstractColumnParser<?> parser) |
Sets the value at row to the parsed value of the given String using the given parser and
returns this column
|
FloatColumn |
set(int row,
Column<Float> column,
int sourceRow) |
Sets the value at row to the value at sourceRow in the given column and return this column
|
FloatColumn |
setMissing(int i) |
Sets the value at index i to the missing-value indicator for this column type, and return this
column
|
int |
size() |
Returns the number of elements in this column, including missing values
|
void |
sortAscending() |
Sorts my values in ascending order
|
void |
sortDescending() |
Sorts my values in descending order
|
FloatColumn |
subset(int[] rows) |
Return a column of the same type containing just those elements whose indexes are included in
the given array
|
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 containing only the unique values
|
static boolean |
valueIsMissing(float value) |
asStringColumn, filter, first, indexOf, inRange, last, map, max, min, name, parser, sampleN, sampleX, set, set, setName, setParser, sorted, toString, type
allMatch, anyMatch, asList, columnWidth, contains, count, count, filter, first, indexOf, inRange, last, map, map, mapInto, max, max, min, min, name, noneMatch, parser, print, reduce, reduce, sampleN, sampleX, set, set, set, setMissingTo, setName, setParser, sorted, title, type
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
forEach, spliterator
byteSize, countMissing, emptyCopy, emptyCopy, getPrintFormatter, rowComparator, set, set, setPrintFormatter, setPrintFormatter
isBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZero
abs, add, add, add, asPercent, asRatio, bin, cube, cubeRoot, cumMax, cumMin, 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
allMatch, anyMatch, asDoubleArray, asFloatColumn, asStringColumn, autoCorrelation, autoCorrelation, count, count, eval, eval, geometricMean, interpolate, isEmpty, isIn, isMissing, 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
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)
Column
public static boolean valueIsMissing(float value)
public FloatColumn subset(int[] rows)
AbstractColumn
subset
in interface Column<Float>
subset
in class AbstractColumn<FloatColumn,Float>
public Selection isNotIn(float... numbers)
public Selection isIn(float... numbers)
public int size()
Column
public void clear()
Column
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()
Column
public FloatColumn append(float i)
public FloatColumn append(Float val)
Column
public FloatColumn copy()
Column
copy
in interface Column<Float>
copy
in interface NumericColumn<Float>
copy
in class NumberColumn<FloatColumn,Float>
Column
public float[] asFloatArray()
public Float[] asObjectArray()
Column
public FloatColumn set(int i, Float val)
Column
public FloatColumn set(int i, float val)
public Column<Float> set(int row, String stringValue, AbstractColumnParser<?> parser)
Column
public FloatColumn append(Column<Float> column)
Column
public FloatColumn append(Column<Float> column, int row)
Column
public FloatColumn set(int row, Column<Float> column, int sourceRow)
Column
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)
Column
public FloatColumn setMissing(int i)
Column
public void sortAscending()
Column
public void sortDescending()
Column
public FloatColumn appendMissing()
Column
appendMissing
in interface Column<Float>
appendMissing
in class NumberColumn<FloatColumn,Float>
public FloatColumn appendObj(Object obj)
Column
public FloatColumn appendCell(String value)
Column
public FloatColumn appendCell(String value, AbstractColumnParser<?> parser)
Column
public String getUnformattedString(int row)
Column
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 © 2021. All rights reserved.