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(String name) |
DoubleColumn(String name,
double[] arr) |
DoubleColumn(String name,
int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
DoubleColumn |
abs()
Returns a doubleColumn with the absolute value of each value in this column
|
void |
append(Column column) |
void |
append(double d)
Adds the given double to this column
|
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() |
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(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
|
int |
countUnique()
Returns the count of unique values in this column.
|
DoubleColumn |
cube() |
DoubleColumn |
cubeRoot() |
DoubleColumn |
cumProd()
Returns a new column with a cumulative product calculated
|
DoubleColumn |
cumSum()
Returns a new column with a cumulative sum calculated
|
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 |
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)
Returns double 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(double d) |
Selection |
isEqualTo(DoubleColumn d) |
Selection |
isGreaterThan(double f) |
Selection |
isGreaterThan(DoubleColumn d) |
Selection |
isGreaterThanOrEqualTo(double f) |
Selection |
isLessThan(double f) |
Selection |
isLessThan(DoubleColumn d) |
Selection |
isLessThanOrEqualTo(double f) |
Selection |
isMissing() |
protected static boolean |
isMissing(double value) |
Selection |
isNegative() |
Selection |
isNonNegative() |
Selection |
isNotEqualTo(double d) |
Selection |
isNotMissing() |
Selection |
isPositive() |
Selection |
isZero() |
it.unimi.dsi.fastutil.doubles.DoubleIterator |
iterator() |
double |
kurtosis() |
DoubleColumn |
log10()
Returns the base 10 log of the values in this column as a new DoubleColumn
|
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 DoubleColumn
|
double |
max() |
double |
mean() |
double |
median() |
double |
min() |
DoubleColumn |
neg()
For each item in the column, returns the same number with the sign changed.
|
DoubleColumn |
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() |
DoubleColumn |
remainder(DoubleColumn column2) |
DoubleColumn |
round() |
IntColumn |
roundInt()
Returns the rounded values as a IntColumn.
|
LongColumn |
roundLong()
Returns the rounded values as a LongColumn
|
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator()
Compares the given ints, which refer to the indexes of the doubles in this column, according to the values of the
doubles themselves
|
Selection |
select(DoubleBiPredicate predicate,
double value) |
Selection |
select(DoublePredicate predicate) |
void |
set(double 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.0, myColumn.isMissing()); // no more missing values
|
void |
set(int r,
double value) |
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
DoubleColumn |
sqrt() |
DoubleColumn |
square()
Returns a doubleColumn with the square of each value in this column
|
double |
standardDeviation() |
Stats |
stats() |
double |
sum() |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
it.unimi.dsi.fastutil.doubles.DoubleArrayList |
top(int n)
Returns the largest ("top") n values in the column
|
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, waitspliteratoradd, add, addColumns, divide, divide, divideColumns, getFloat, getInt, getLong, multiply, multiply, multiplyColumns, subtract, subtract, subtractColumnspublic DoubleColumn(String name)
public DoubleColumn(String name, int initialSize)
public DoubleColumn(String name, double[] arr)
public DoubleColumn(ColumnMetadata metadata)
protected static boolean isMissing(double value)
public static double convert(String stringValue)
We remove any commas before parsing
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()
Columntype in interface ColumnColumnTypepublic 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 append(float f)
public void append(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 d)
public Selection isEqualTo(double d)
public Selection isEqualTo(DoubleColumn d)
public Selection isGreaterThan(DoubleColumn d)
public Selection isLessThan(DoubleColumn d)
public 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 int countMissing()
countMissing in interface Columnpublic void appendCell(String object)
appendCell in interface ColumnappendCell in class AbstractColumnpublic DoubleColumn logN()
public DoubleColumn log10()
public DoubleColumn log1p()
public DoubleColumn round()
public LongColumn roundLong()
public IntColumn roundInt()
ClassCastException - if the returned value will not fit in an intpublic DoubleColumn abs()
public DoubleColumn square()
public DoubleColumn sqrt()
public DoubleColumn cubeRoot()
public DoubleColumn cube()
public DoubleColumn remainder(DoubleColumn 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)
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,
double value)
public void set(double newValue,
Selection rowSelection)
public Selection isPositive()
public Selection isZero()
public Selection isNegative()
public Selection isNonNegative()
public double[] asDoubleArray()
asDoubleArray in interface NumericColumnasDoubleArray in interface Columnpublic it.unimi.dsi.fastutil.doubles.DoubleIterator iterator()
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 AbstractColumnColumnpublic DoubleColumn cumSum()
public DoubleColumn cumProd()
public DoubleColumn pctChange()
Copyright © 2018. All rights reserved.