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,
it.unimi.dsi.fastutil.doubles.DoubleArrayList data) |
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
|
DoubleColumn |
add(DoubleColumn column2) |
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[]
|
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() |
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) |
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 |
isGreaterThanOrEqualTo(double f) |
Selection |
isLessThan(double f) |
Selection |
isLessThanOrEqualTo(double f) |
Selection |
isMissing() |
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 |
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() |
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 doubles in this column, according to the values of the
doubles 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()
Returns a doubleColumn with the square of each value in this column
|
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
|
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, waitforEach, spliteratorcolumnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, setComment, setName, subset, titlepublic DoubleColumn(String name)
public DoubleColumn(String name, int initialSize)
public DoubleColumn(String name, double[] arr)
public DoubleColumn(String name, it.unimi.dsi.fastutil.doubles.DoubleArrayList data)
public DoubleColumn(ColumnMetadata metadata)
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()
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 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 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()
Implementation note: We use NaN for missing, so we can't compare against the MISSING_VALUE and use val != val instead
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 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 float getFloat(int index)
getFloat in interface NumericColumnpublic double getDouble(int index)
public void set(int r,
double value)
public Selection isPositive()
public Selection isZero()
public Selection isNegative()
public Selection isNonNegative()
public double[] toDoubleArray()
toDoubleArray in interface NumericColumntoDoubleArray 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 AbstractColumnCopyright © 2017. All rights reserved.