public class FloatColumn extends AbstractColumn implements it.unimi.dsi.fastutil.floats.FloatIterable, NumericColumn
| Modifier and Type | Field and Description |
|---|---|
static float |
MISSING_VALUE |
| Constructor and Description |
|---|
FloatColumn(ColumnMetadata metadata) |
FloatColumn(String name) |
FloatColumn(String name,
float[] arr) |
FloatColumn(String name,
it.unimi.dsi.fastutil.floats.FloatArrayList data) |
FloatColumn(String name,
int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
FloatColumn |
abs() |
void |
append(Column column) |
void |
append(double d)
Adds the given double to this column, after casting it to a float
|
void |
append(float f)
Adds the given float to this column
|
void |
appendCell(String object) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
double[] |
asDoubleArray() |
DoubleColumn |
asDoubleColumn() |
it.unimi.dsi.fastutil.floats.FloatArrayList |
bottom(int n)
Returns the smallest ("bottom") n values in the column
|
int |
byteSize()
Returns the width of a cell in this column, in bytes.
|
void |
clear() |
boolean |
contains(float value) |
static float |
convert(String stringValue)
Returns a float that is parsed from the given String
|
FloatColumn |
copy()
Returns a deep copy of the receiver
|
int |
countMissing()
Returns the count of missing values in this column
|
int |
countUnique()
Returns the count of unique values in this column.
|
FloatColumn |
cube() |
FloatColumn |
cubeRoot() |
FloatColumn |
cumProd()
Returns a new column with a cumulative product calculated
|
FloatColumn |
cumSum()
Returns a new column with a cumulative sum calculated
|
it.unimi.dsi.fastutil.floats.FloatArrayList |
data() |
FloatColumn |
difference()
Returns a new column of the same type as the receiver, such that the values in the new column
contain the difference between each cell in the original and it's predecessor.
|
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.
|
float |
firstElement() |
double |
geometricMean() |
float |
get(int index) |
double |
getDouble(int index)
Returns double value at
index position in the column. |
float |
getFloat(int index)
Returns float value at
index position in the column. |
String |
getString(int row)
Returns a string representation of the value at the given row.
|
boolean |
isEmpty()
Returns true if the column has no data
|
Selection |
isEqualTo(float f) |
Selection |
isEqualTo(FloatColumn f) |
Selection |
isGreaterThan(float f) |
Selection |
isGreaterThan(FloatColumn f) |
Selection |
isGreaterThanOrEqualTo(float f) |
Selection |
isLessThan(float f) |
Selection |
isLessThan(FloatColumn f) |
Selection |
isLessThanOrEqualTo(float f) |
Selection |
isMissing() |
protected static boolean |
isMissing(float value) |
Selection |
isNegative() |
Selection |
isNonNegative() |
Selection |
isNotEqualTo(float f) |
Selection |
isNotMissing() |
Selection |
isPositive() |
Selection |
isZero() |
it.unimi.dsi.fastutil.floats.FloatIterator |
iterator() |
double |
kurtosis() |
FloatColumn |
log10() |
FloatColumn |
log1p()
Returns the natural log of the values in this column, after adding 1 to each so that zero
values don't return -Infinity
|
FloatColumn |
logN()
Returns the natural log of the values in this column as a new FloatColumn
|
double |
max() |
double |
mean() |
double |
median() |
double |
min() |
FloatColumn |
neg()
For each item in the column, returns the same number with the sign changed.
|
FloatColumn |
pctChange()
Returns a new column with a percent change calculated
|
double |
percentile(double percentile) |
double |
populationVariance() |
String |
print() |
double |
product() |
double |
quadraticMean()
Returns the quadraticMean, aka the root-mean-square, for all values in this column
|
double |
quartile1() |
double |
quartile3() |
double |
range() |
FloatColumn |
remainder(FloatColumn column2) |
FloatColumn |
round() |
IntColumn |
roundInt()
Returns the rounded values as a IntColumn.
|
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator()
Compares the given ints, which refer to the indexes of the floats in this column, according to the values of the
floats themselves
|
Selection |
select(FloatBiPredicate predicate,
float value) |
Selection |
select(FloatPredicate predicate) |
void |
set(float newValue,
Selection rowSelection)
Conditionally update this column, replacing current values with newValue for all rows where the current value
matches the selection criteria
Example:
myColumn.set(4.0f, myColumn.isMissing()); // no more missing values
|
void |
set(int r,
float value) |
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
FloatColumn |
sqrt() |
FloatColumn |
square() |
double |
standardDeviation() |
Stats |
stats() |
double |
sum() |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
it.unimi.dsi.fastutil.floats.FloatArrayList |
top(int n)
Returns the largest ("top") n values in the column
|
String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
FloatColumn |
unique()
Returns a column of the same type as the receiver, containing only the unique values of the receiver.
|
double |
variance() |
columnMetadata, columnWidth, comment, id, metadata, name, setComment, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitspliteratoradd, add, addColumns, divide, divide, divideColumns, getInt, getLong, multiply, multiply, multiplyColumns, subtract, subtract, subtractColumnspublic FloatColumn(String name)
public FloatColumn(String name, int initialSize)
public FloatColumn(String name, float[] arr)
public FloatColumn(String name, it.unimi.dsi.fastutil.floats.FloatArrayList data)
public FloatColumn(ColumnMetadata metadata)
protected static boolean isMissing(float value)
public static float convert(String stringValue)
We remove any commas before parsing
public Stats stats()
public int countUnique()
ColumncountUnique in interface Columnpublic it.unimi.dsi.fastutil.floats.FloatArrayList 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 it.unimi.dsi.fastutil.floats.FloatArrayList 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 FloatColumn unique()
Columnpublic it.unimi.dsi.fastutil.floats.FloatArrayList data()
public ColumnType type()
Columntype in interface ColumnColumnTypepublic float firstElement()
public double sum()
public double product()
product in interface NumericColumnpublic double mean()
mean in interface NumericColumnpublic double median()
median in interface NumericColumnpublic double quartile1()
quartile1 in interface NumericColumnpublic double quartile3()
quartile3 in interface NumericColumnpublic double percentile(double percentile)
percentile in interface NumericColumnpublic double range()
range in interface NumericColumnpublic double max()
max in interface NumericColumnpublic double min()
min in interface NumericColumnpublic double variance()
variance in interface NumericColumnpublic double populationVariance()
populationVariance in interface NumericColumnpublic double standardDeviation()
standardDeviation in interface NumericColumnpublic double sumOfLogs()
sumOfLogs in interface NumericColumnpublic double sumOfSquares()
sumOfSquares in interface NumericColumnpublic double geometricMean()
geometricMean in interface NumericColumnpublic double quadraticMean()
quadraticMean in interface NumericColumnpublic double kurtosis()
kurtosis in interface NumericColumnpublic double skewness()
skewness in interface NumericColumnpublic void append(float f)
public void append(double d)
public Selection isLessThan(float f)
public Selection isZero()
public Selection isNegative()
public Selection isPositive()
public Selection isNonNegative()
public Selection isNotMissing()
isNotMissing in interface Columnpublic Selection isGreaterThan(float f)
public Selection isGreaterThanOrEqualTo(float f)
public Selection isLessThanOrEqualTo(float f)
public Selection isNotEqualTo(float f)
public Selection isEqualTo(float f)
public Selection isEqualTo(FloatColumn f)
public Selection isGreaterThan(FloatColumn f)
public Selection isLessThan(FloatColumn f)
public String getString(int row)
Columnpublic FloatColumn emptyCopy()
Columnpublic FloatColumn emptyCopy(int rowSize)
Columnpublic FloatColumn copy()
Columnpublic void sortAscending()
sortAscending in interface Columnpublic void sortDescending()
sortDescending in interface Columnpublic boolean isEmpty()
Columnpublic int countMissing()
countMissing in interface Columnpublic void appendCell(String object)
appendCell in interface ColumnappendCell in class AbstractColumnpublic FloatColumn logN()
public FloatColumn log10()
public FloatColumn log1p()
public FloatColumn round()
public IntColumn roundInt()
public FloatColumn abs()
public FloatColumn square()
public FloatColumn sqrt()
public FloatColumn cubeRoot()
public FloatColumn cube()
public FloatColumn remainder(FloatColumn column2)
public FloatColumn neg()
public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Columnpublic float get(int index)
public float getFloat(int index)
NumericColumnindex position in the column. A conversion, if needed, could result
in data or accuracy loss.getFloat in interface NumericColumnindex - position in columnpublic double getDouble(int index)
NumericColumnindex position in the column. A conversion, if needed, could result
in data or accuracy loss.getDouble in interface NumericColumnindex - position in columnpublic void set(int r,
float value)
public void set(float newValue,
Selection rowSelection)
public double[] asDoubleArray()
asDoubleArray in interface NumericColumnasDoubleArray in interface Columnpublic DoubleColumn asDoubleColumn()
public it.unimi.dsi.fastutil.floats.FloatIterator iterator()
public Selection select(FloatPredicate predicate)
public Selection select(FloatBiPredicate predicate, float value)
public boolean contains(float value)
public int byteSize()
Columnpublic byte[] asBytes(int rowNumber)
public FloatColumn difference()
Columndifference in interface Columndifference in class AbstractColumnColumnpublic FloatColumn cumSum()
public FloatColumn cumProd()
public FloatColumn pctChange()
Copyright © 2018. All rights reserved.