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() |
FloatColumn |
add(FloatColumn column2) |
FloatColumn |
addToEach(float value) |
FloatColumn |
addToEach(int value) |
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
|
FloatColumn |
append(FloatColumn column2) |
void |
appendCell(String object) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
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() |
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 |
divide(FloatColumn column2) |
FloatColumn |
divide(IntColumn column2) |
FloatColumn |
divide(LongColumn column2) |
FloatColumn |
divide(ShortColumn column2) |
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) |
float |
getFloat(int index) |
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 |
isGreaterThanOrEqualTo(float f) |
Selection |
isLessThan(float f) |
Selection |
isLessThanOrEqualTo(float f) |
Selection |
isMissing() |
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 |
multiply(FloatColumn column2) |
FloatColumn |
multiply(IntColumn column2) |
FloatColumn |
multiply(LongColumn column2) |
FloatColumn |
multiply(ShortColumn column2) |
FloatColumn |
neg()
For each item in the column, returns the same number with the sign changed.
|
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() |
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(int r,
float value) |
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
FloatColumn |
sqrt() |
FloatColumn |
square() |
double |
standardDeviation() |
Stats |
stats() |
FloatColumn |
subtract(FloatColumn column2) |
double |
sum() |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
double[] |
toDoubleArray() |
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, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public 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)
public static float convert(String stringValue)
We remove any commas before parsing
public Stats stats()
public int countUnique()
Column
countUnique
in interface Column
public 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()
Column
public it.unimi.dsi.fastutil.floats.FloatArrayList data()
public ColumnType type()
Column
type
in interface Column
ColumnType
public float firstElement()
public double sum()
public double product()
product
in interface NumericColumn
public double mean()
mean
in interface NumericColumn
public double median()
median
in interface NumericColumn
public double quartile1()
quartile1
in interface NumericColumn
public double quartile3()
quartile3
in interface NumericColumn
public double percentile(double percentile)
percentile
in interface NumericColumn
public double range()
range
in interface NumericColumn
public double max()
max
in interface NumericColumn
public double min()
min
in interface NumericColumn
public double variance()
variance
in interface NumericColumn
public double populationVariance()
populationVariance
in interface NumericColumn
public double standardDeviation()
standardDeviation
in interface NumericColumn
public double sumOfLogs()
sumOfLogs
in interface NumericColumn
public double sumOfSquares()
sumOfSquares
in interface NumericColumn
public double geometricMean()
geometricMean
in interface NumericColumn
public double quadraticMean()
quadraticMean
in interface NumericColumn
public double kurtosis()
kurtosis
in interface NumericColumn
public double skewness()
skewness
in interface NumericColumn
public 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 Column
public 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 String getString(int row)
Column
public FloatColumn emptyCopy()
Column
public FloatColumn emptyCopy(int rowSize)
Column
public FloatColumn copy()
Column
public void sortAscending()
sortAscending
in interface Column
public void sortDescending()
sortDescending
in interface Column
public boolean isEmpty()
Column
public int countMissing()
Implementation note: We use NaN for missing, so we can't compare against the MISSING_VALUE and use val != val instead
countMissing
in interface Column
public void appendCell(String object)
appendCell
in interface Column
appendCell
in class AbstractColumn
public FloatColumn logN()
public FloatColumn log10()
public FloatColumn log1p()
public FloatColumn round()
public FloatColumn abs()
public FloatColumn square()
public FloatColumn sqrt()
public FloatColumn cubeRoot()
public FloatColumn cube()
public FloatColumn remainder(FloatColumn column2)
public FloatColumn append(FloatColumn column2)
public FloatColumn subtract(FloatColumn column2)
public FloatColumn multiply(FloatColumn column2)
public FloatColumn multiply(IntColumn column2)
public FloatColumn multiply(LongColumn column2)
public FloatColumn multiply(ShortColumn column2)
public FloatColumn divide(FloatColumn column2)
public FloatColumn divide(IntColumn column2)
public FloatColumn divide(LongColumn column2)
public FloatColumn divide(ShortColumn column2)
public FloatColumn neg()
public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator
in interface Column
public float get(int index)
public float getFloat(int index)
getFloat
in interface NumericColumn
public void set(int r, float value)
public double[] toDoubleArray()
toDoubleArray
in interface NumericColumn
toDoubleArray
in interface Column
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()
Column
public byte[] asBytes(int rowNumber)
public FloatColumn difference()
Column
difference
in interface Column
difference
in class AbstractColumn
Column
public FloatColumn add(FloatColumn column2)
public FloatColumn addToEach(float value)
public FloatColumn addToEach(int value)
Copyright © 2017. All rights reserved.