public class DoubleColumn extends AbstractColumn implements it.unimi.dsi.fastutil.doubles.DoubleIterable, NumericColumn
| Modifier and Type | Field and Description |
|---|---|
static double |
MISSING_VALUE |
| Constructor and Description |
|---|
DoubleColumn(ColumnMetadata metadata) |
DoubleColumn(java.lang.String name) |
DoubleColumn(java.lang.String name,
int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
DoubleColumn |
abs() |
void |
add(double d)
Adds the given double to this column, after casting it to a double
|
DoubleColumn |
add(DoubleColumn column2) |
void |
addCell(java.lang.String object) |
void |
append(Column column) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
it.unimi.dsi.fastutil.doubles.DoubleArrayList |
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(double value) |
static double |
convert(java.lang.String stringValue)
Returns a double that is parsed from the given String
|
DoubleColumn |
copy()
Returns a deep copy of the receiver
|
int |
countMissing()
Returns the count of missing values in this column
Implementation note: We use NaN for missing, so we can't compare against the MISSING_VALUE and use val != val instead
|
int |
countUnique()
Returns the count of unique values in this column
|
static DoubleColumn |
create(java.lang.String name) |
static DoubleColumn |
create(java.lang.String name,
it.unimi.dsi.fastutil.doubles.DoubleArrayList floats) |
static DoubleColumn |
create(java.lang.String name,
int initialSize) |
DoubleColumn |
cube() |
DoubleColumn |
cubeRoot() |
it.unimi.dsi.fastutil.doubles.DoubleArrayList |
data() |
DoubleColumn |
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.
|
DoubleColumn |
divide(DoubleColumn column2) |
DoubleColumn |
divide(IntColumn column2) |
DoubleColumn |
divide(LongColumn column2) |
DoubleColumn |
divide(ShortColumn column2) |
DoubleColumn |
emptyCopy()
Returns a copy of the receiver with no data.
|
DoubleColumn |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size
|
double |
firstElement() |
double |
geometricMean() |
double |
get(int index) |
double |
getDouble(int index) |
float |
getFloat(int index) |
java.lang.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(double f) |
Selection |
isEqualTo(DoubleColumn f) |
Selection |
isGreaterThan(double f) |
Selection |
isGreaterThanOrEqualTo(double f) |
Selection |
isLessThan(double f) |
Selection |
isLessThanOrEqualTo(double f) |
Selection |
isMissing() |
Selection |
isNotEqualTo(double f) |
Selection |
isNotMissing() |
it.unimi.dsi.fastutil.doubles.DoubleIterator |
iterator() |
double |
kurtosis() |
DoubleColumn |
log10() |
DoubleColumn |
log1p()
Returns the natural log of the values in this column, after adding 1 to each so that zero
values don't return -Infinity
|
DoubleColumn |
logN()
Returns the natural log of the values in this column as a new FloatColumn
|
double |
max() |
double |
mean() |
double |
median() |
double |
min() |
DoubleColumn |
multiply(DoubleColumn column2) |
DoubleColumn |
multiply(IntColumn column2) |
DoubleColumn |
multiply(LongColumn column2) |
DoubleColumn |
multiply(ShortColumn column2) |
DoubleColumn |
neg()
For each item in the column, returns the same number with the sign changed.
|
double |
percentile(double percentile) |
double |
populationVariance() |
java.lang.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() |
DoubleColumn |
remainder(DoubleColumn column2) |
DoubleColumn |
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(DoubleBiPredicate predicate,
double value) |
Selection |
select(DoublePredicate predicate) |
void |
set(int r,
double value) |
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
DoubleColumn |
sqrt() |
DoubleColumn |
square() |
double |
standardDeviation() |
Stats |
stats() |
DoubleColumn |
subtract(DoubleColumn column2) |
double |
sum() |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
double[] |
toDoubleArray() |
it.unimi.dsi.fastutil.doubles.DoubleArrayList |
top(int n)
Returns the largest ("top") n values in the column
|
java.lang.String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
DoubleColumn |
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, waitcolumnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, setComment, setName, subset, titlepublic DoubleColumn(java.lang.String name)
public DoubleColumn(java.lang.String name,
int initialSize)
public DoubleColumn(ColumnMetadata metadata)
public Stats stats()
public int countUnique()
ColumncountUnique in interface Columnpublic it.unimi.dsi.fastutil.doubles.DoubleArrayList 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.doubles.DoubleArrayList 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 DoubleColumn unique()
Columnpublic it.unimi.dsi.fastutil.doubles.DoubleArrayList data()
public ColumnType type()
Columnpublic double 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 add(double d)
public Selection isLessThan(double f)
public Selection isNotMissing()
isNotMissing in interface Columnpublic Selection isGreaterThan(double f)
public Selection isGreaterThanOrEqualTo(double f)
public Selection isLessThanOrEqualTo(double f)
public Selection isNotEqualTo(double f)
public Selection isEqualTo(double f)
public Selection isEqualTo(DoubleColumn f)
public java.lang.String getString(int row)
Columnpublic DoubleColumn emptyCopy()
Columnpublic DoubleColumn emptyCopy(int rowSize)
Columnpublic DoubleColumn copy()
Columnpublic void sortAscending()
sortAscending in interface Columnpublic void sortDescending()
sortDescending in interface Columnpublic boolean isEmpty()
Columnpublic static DoubleColumn create(java.lang.String name)
public static DoubleColumn create(java.lang.String name, int initialSize)
public static DoubleColumn create(java.lang.String name, it.unimi.dsi.fastutil.doubles.DoubleArrayList floats)
public int countMissing()
countMissing in interface Columnpublic void addCell(java.lang.String object)
addCell in interface ColumnaddCell in class AbstractColumnpublic static double convert(java.lang.String stringValue)
We remove any commas before parsing
public DoubleColumn logN()
public DoubleColumn log10()
public DoubleColumn log1p()
public DoubleColumn round()
public DoubleColumn abs()
public DoubleColumn square()
public DoubleColumn sqrt()
public DoubleColumn cubeRoot()
public DoubleColumn cube()
public DoubleColumn remainder(DoubleColumn column2)
public DoubleColumn add(DoubleColumn column2)
public DoubleColumn subtract(DoubleColumn column2)
public DoubleColumn multiply(DoubleColumn column2)
public DoubleColumn multiply(IntColumn column2)
public DoubleColumn multiply(LongColumn column2)
public DoubleColumn multiply(ShortColumn column2)
public DoubleColumn divide(DoubleColumn column2)
public DoubleColumn divide(IntColumn column2)
public DoubleColumn divide(LongColumn column2)
public DoubleColumn divide(ShortColumn column2)
public DoubleColumn neg()
public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Columnpublic double get(int index)
public double getDouble(int index)
public void set(int r,
double value)
public double[] toDoubleArray()
toDoubleArray in interface NumericColumntoDoubleArray in interface Columnpublic float getFloat(int index)
getFloat in interface NumericColumnpublic java.lang.String toString()
toString in class java.lang.Objectpublic it.unimi.dsi.fastutil.doubles.DoubleIterator iterator()
iterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterableiterator in interface java.lang.Iterable<java.lang.Double>public Selection select(DoublePredicate predicate)
public Selection select(DoubleBiPredicate predicate, double value)
public boolean contains(double value)
public int byteSize()
Columnpublic byte[] asBytes(int rowNumber)
public DoubleColumn difference()
Columndifference in interface Columndifference in class AbstractColumn