public class IntColumn extends AbstractColumn implements IntMapUtils, NumericColumn, IntConvertibleColumn
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ARRAY_SIZE |
static int |
MISSING_VALUE |
isEqualTo, isEven, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isMissing, isNegative, isNonNegative, isNotEqualTo, isNotMissing, isOdd, isPositive, isZero| Constructor and Description |
|---|
IntColumn(ColumnMetadata metadata) |
IntColumn(String name) |
IntColumn(String name,
int initialSize) |
IntColumn(String name,
int[] arr) |
IntColumn(String name,
it.unimi.dsi.fastutil.ints.IntArrayList data) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Column column) |
void |
append(int i) |
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.floats.FloatArrayList |
asFloatArray() |
int[] |
asIntArray() |
it.unimi.dsi.fastutil.ints.IntSet |
asSet() |
it.unimi.dsi.fastutil.ints.IntArrayList |
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(int i) |
IntColumn |
copy()
Returns a deep copy of the receiver
|
long |
countIf(IntPredicate predicate) |
int |
countMissing()
Returns the count of missing values in this column
|
int |
countUnique()
Returns the count of unique values in this column.
|
IntColumn |
cumProd()
Returns a new column with a cumulative product calculated
|
IntColumn |
cumSum()
Returns a new column with a cumulative sum calculated
|
it.unimi.dsi.fastutil.ints.IntArrayList |
data() |
IntColumn |
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.
|
IntColumn |
emptyCopy()
Returns a copy of the receiver with no data.
|
IntColumn |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size.
|
int |
firstElement() |
double |
geometricMean() |
int |
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. |
int |
getInt(int index)
Returns int value at
index position in the column. |
long |
getLong(int index)
Returns long 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(int i) |
Selection |
isEqualTo(IntColumn other) |
Selection |
isEven() |
Selection |
isGreaterThan(int i) |
Selection |
isGreaterThan(IntColumn other) |
Selection |
isGreaterThanOrEqualTo(int i) |
Selection |
isIn(int... values) |
Selection |
isLessThan(int i) |
Selection |
isLessThan(IntColumn other) |
Selection |
isLessThanOrEqualTo(int i) |
Selection |
isMissing() |
protected static boolean |
isMissing(int value) |
Selection |
isNegative() |
Selection |
isNonNegative() |
Selection |
isNotEqualTo(int i) |
Selection |
isNotMissing() |
Selection |
isOdd() |
Selection |
isPositive() |
Selection |
isZero() |
it.unimi.dsi.fastutil.ints.IntIterator |
iterator() |
double |
kurtosis() |
double |
max() |
double |
mean() |
double |
median() |
double |
min() |
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() |
IntColumn |
remainder(IntColumn column2) |
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator() |
Selection |
select(IntBiPredicate predicate,
int value) |
Selection |
select(IntPredicate predicate) |
IntColumn |
select(Selection selection) |
IntColumn |
selectIf(IntPredicate predicate) |
void |
set(int index,
int value) |
void |
set(int 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, myColumn.isMissing()); // no more missing values
|
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
double |
standardDeviation() |
Stats |
stats() |
long |
sum() |
long |
sumIf(IntPredicate predicate) |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
it.unimi.dsi.fastutil.ints.IntArrayList |
top(int n)
Returns the largest ("top") n values in the column
|
String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
IntColumn |
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, waitasPercent, asRatio, divide, divide, divide, multiply, multiply, names, plus, plus, subtractcolumnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, rolling, setComment, setName, subset, titlespliteratoradd, add, addColumns, divide, divide, divideColumns, multiply, multiply, multiplyColumns, subtract, subtract, subtractColumnsasIntegerSetpublic static final int MISSING_VALUE
public static final int DEFAULT_ARRAY_SIZE
public IntColumn(String name)
public IntColumn(String name, int initialSize)
public IntColumn(String name, it.unimi.dsi.fastutil.ints.IntArrayList data)
public IntColumn(String name, int[] arr)
public IntColumn(ColumnMetadata metadata)
protected static boolean isMissing(int value)
public it.unimi.dsi.fastutil.ints.IntArrayList data()
public ColumnType type()
Columntype in interface ColumnColumnTypepublic void append(int i)
public void set(int index,
int value)
public void set(int newValue,
Selection rowSelection)
public Selection isLessThan(int i)
public Selection isGreaterThan(int i)
public Selection isGreaterThanOrEqualTo(int i)
public Selection isLessThanOrEqualTo(int i)
public Selection isNotEqualTo(int i)
public Selection isEqualTo(int i)
public Selection isNotMissing()
isNotMissing in interface Columnpublic Selection isIn(int... values)
public int countMissing()
countMissing in interface Columnpublic int countUnique()
ColumncountUnique in interface Columnpublic IntColumn unique()
Columnpublic it.unimi.dsi.fastutil.ints.IntSet asSet()
public String getString(int row)
Columnpublic IntColumn emptyCopy()
Columnpublic IntColumn emptyCopy(int rowSize)
Columnpublic void sortAscending()
sortAscending in interface Columnpublic void sortDescending()
sortDescending in interface Columnpublic IntColumn copy()
Columnpublic boolean isEmpty()
Columnpublic void appendCell(String object)
appendCell in interface ColumnappendCell in class AbstractColumnpublic int get(int index)
get in interface IntMapUtilspublic int getInt(int index)
NumericColumnindex position in the column. A conversion, if needed, could result
in data or accuracy loss.getInt in interface NumericColumnindex - position in columnpublic long getLong(int index)
NumericColumnindex position in the column. A conversion, if needed, could result
in data or accuracy loss.getLong in interface NumericColumnindex - position in columnpublic 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 it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Columnpublic int firstElement()
public long sum()
sum in interface IntMapUtilspublic 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 Selection isPositive()
public Selection isNegative()
public Selection isNonNegative()
public Selection isZero()
public Selection isEven()
public Selection isOdd()
public it.unimi.dsi.fastutil.floats.FloatArrayList asFloatArray()
public int[] asIntArray()
asIntArray in interface IntConvertibleColumnpublic double[] asDoubleArray()
asDoubleArray in interface NumericColumnasDoubleArray in interface Columnpublic IntColumn selectIf(IntPredicate predicate)
public Selection select(IntPredicate predicate)
public Selection select(IntBiPredicate predicate, int value)
public long sumIf(IntPredicate predicate)
public long countIf(IntPredicate predicate)
public it.unimi.dsi.fastutil.ints.IntArrayList 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.ints.IntArrayList 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 it.unimi.dsi.fastutil.ints.IntIterator iterator()
public Stats stats()
public boolean contains(int i)
public int byteSize()
Columnpublic byte[] asBytes(int rowNumber)
public IntColumn difference()
Columndifference in interface Columndifference in class AbstractColumnColumnpublic IntColumn cumSum()
public IntColumn cumProd()
public DoubleColumn pctChange()
Copyright © 2018. All rights reserved.