public class FloatColumn extends NumberColumn<Float>
comparator, locale, printFormatterDEFAULT_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
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.
|
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,
int initialSize) |
FloatColumn |
createCol(String name) |
FloatColumn |
createCol(String name,
int initialSize) |
FloatColumn |
emptyCopy()
Returns a copy of the receiver with no data.
|
FloatColumn |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size.
|
FloatColumn |
filter(Predicate<? super Float> test)
Returns a new Column of the same type with only those rows satisfying the predicate
|
FloatColumn |
first(int numRows) |
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) |
FloatColumn |
inRange(int start,
int end)
Returns a column containing the rows in this column beginning with start inclusive, and ending with end exclusive
|
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 |
last(int numRows) |
FloatColumn |
lead(int n)
Returns a column of the same type as the receiver, containing the receivers values offset -n
For example if you lead a column containing 2, 3, 4 by 1, you get a column containing 3, 4, NA.
|
FloatColumn |
map(Function<? super Float,? extends Float> fun)
Maps the function across all rows, appending the results to a new Column of the same type
|
FloatColumn |
max(Column<Float> other)
Returns a column containing the element-wise min between this column and other column
TODO(lwhite) Override in column subtypes for better performance
|
FloatColumn |
min(Column<Float> other)
Returns a column containing the element-wise min between this column and other column
TODO(lwhite) Override in column subtypes for better performance
|
FloatColumn |
removeMissing() |
FloatColumn |
sampleN(int n)
Returns a column containing a random sample of the values in this column
|
FloatColumn |
sampleX(double proportion)
Returns a table consisting of randomly selected values from this column.
|
FloatColumn |
set(int row,
Column<Float> column,
int sourceRow) |
FloatColumn |
set(int i,
float val) |
FloatColumn |
set(int i,
Float val) |
FloatColumn |
set(Selection condition,
Column<Float> other)
Updates this column where values matching the selection are replaced with the corresponding value
from the given column
|
FloatColumn |
set(Selection rowSelection,
Float newValue)
Conditionally update this column, replacing current values with newValue for all rows where the current value
matches the selection criteria
|
Column<Float> |
setMissing(int i) |
FloatColumn |
setName(String name)
Sets the columns name to the given string
|
int |
size() |
void |
sortAscending() |
void |
sortDescending() |
FloatColumn |
sorted(Comparator<? super Float> comp)
Returns a new Column of the same type sorted according to the provided Comparator
|
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.
|
FloatColumn |
where(Selection selection) |
allMatch, anyMatch, byteSize, countMissing, noneMatch, rowComparator, setPrintFormatter, setPrintFormatterasStringColumn, name, toString, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasDoubleArray, asFloatColumn, asStringColumn, count, count, eval, eval, eval, eval, eval, geometricMean, isEmpty, isIn, isIn, isMissing, isNotIn, isNotIn, isNotMissing, kendalls, kurtosis, 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, varianceallMatch, anyMatch, asList, columnWidth, contains, count, count, mapInto, max, min, name, noneMatch, print, reduce, reduce, title, typeforEach, spliteratorcomparing, 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, sqrt, square, subtract, subtract, subtractisBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZeropublic String getString(int row)
Columnpublic static FloatColumn create(String name)
public static FloatColumn create(String name, float[] arr)
public static FloatColumn create(String name, int initialSize)
public FloatColumn createCol(String name, int initialSize)
createCol in class NumberColumn<Float>public FloatColumn createCol(String name)
createCol in class NumberColumn<Float>public Float get(int index)
public FloatColumn subset(int[] rows)
public int size()
public void clear()
public FloatColumn unique()
ColumnColumnpublic FloatColumn top(int n)
NumberColumntop in class NumberColumn<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)
NumberColumnbottom in class NumberColumn<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)
ColumnFor 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 emptyCopy()
Columnpublic FloatColumn emptyCopy(int rowSize)
Columnpublic FloatColumn copy()
Columnpublic 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)
NumberColumnpublic int countUnique()
Columnpublic 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()
ColumnappendMissing in interface Column<Float>appendMissing in class NumberColumn<Float>public FloatColumn appendObj(Object obj)
public FloatColumn appendCell(String value)
public FloatColumn appendCell(String value, AbstractColumnParser<?> parser)
public String getUnformattedString(int row)
public FloatColumn inRange(int start, int end)
Columnpublic FloatColumn where(Selection selection)
public FloatColumn lead(int n)
Columnpublic FloatColumn setName(String name)
Columnpublic FloatColumn filter(Predicate<? super Float> test)
Columntest - the predicatepublic FloatColumn sorted(Comparator<? super Float> comp)
Columncomp - the Comparatorpublic FloatColumn map(Function<? super Float,? extends Float> fun)
Columnfun - function to mappublic FloatColumn min(Column<Float> other)
Columnpublic FloatColumn max(Column<Float> other)
Columnpublic FloatColumn set(Selection condition, Column<Float> other)
Columnpublic FloatColumn set(Selection rowSelection, Float newValue)
Columnpublic FloatColumn first(int numRows)
public FloatColumn last(int numRows)
public FloatColumn sampleN(int n)
Columnn - the number of values to selectpublic FloatColumn sampleX(double proportion)
Columnproportion - The proportion to go in the samplepublic LongColumn asLongColumn()
public IntColumn asIntColumn()
public ShortColumn asShortColumn()
public DoubleColumn asDoubleColumn()
Copyright © 2019. All rights reserved.