public class IntColumn extends AbstractColumn implements IntMapUtils, NumericColumn
Modifier and Type | Field and Description |
---|---|
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(java.lang.String name) |
IntColumn(java.lang.String name,
int initialSize) |
Modifier and Type | Method and Description |
---|---|
void |
add(int i) |
IntColumn |
add(IntColumn 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.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) |
static int |
convert(java.lang.String stringValue)
Returns a float that is parsed from the given String
|
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
|
static IntColumn |
create(ColumnMetadata metadata) |
static IntColumn |
create(java.lang.String name) |
static IntColumn |
create(java.lang.String name,
int arraySize) |
static IntColumn |
create(java.lang.String name,
it.unimi.dsi.fastutil.ints.IntArrayList ints) |
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.
|
FloatColumn |
divide(FloatColumn column2) |
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) |
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(int i) |
Selection |
isEqualTo(IntColumn other) |
Selection |
isEven() |
Selection |
isGreaterThan(int i) |
Selection |
isGreaterThanOrEqualTo(int i) |
Selection |
isLessThan(int i) |
Selection |
isLessThanOrEqualTo(int i) |
Selection |
isMissing() |
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() |
FloatColumn |
multiply(FloatColumn column2) |
IntColumn |
multiply(IntColumn column2) |
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() |
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) |
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
double |
standardDeviation() |
Stats |
stats() |
IntColumn |
subtract(IntColumn column2) |
long |
sum() |
long |
sumIf(IntPredicate predicate) |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
double[] |
toDoubleArray() |
it.unimi.dsi.fastutil.floats.FloatArrayList |
toFloatArray() |
int[] |
toIntArray() |
it.unimi.dsi.fastutil.ints.IntArrayList |
top(int n)
Returns the largest ("top") n values in the column
|
java.lang.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, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asPercent, asRatio, difference, difference, divide, divide, divide, multiply, multiply, names, plus, plus
columnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, setComment, setName, subset, title
public IntColumn(java.lang.String name, int initialSize)
public IntColumn(ColumnMetadata metadata)
public IntColumn(java.lang.String name)
public static IntColumn create(java.lang.String name)
public static IntColumn create(ColumnMetadata metadata)
public static IntColumn create(java.lang.String name, int arraySize)
public static IntColumn create(java.lang.String name, it.unimi.dsi.fastutil.ints.IntArrayList ints)
public it.unimi.dsi.fastutil.ints.IntArrayList data()
public ColumnType type()
Column
public void add(int i)
public void set(int index, int value)
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 Column
public int countMissing()
countMissing
in interface Column
public int countUnique()
Column
countUnique
in interface Column
public IntColumn unique()
Column
public it.unimi.dsi.fastutil.ints.IntSet asSet()
public java.lang.String getString(int row)
Column
public IntColumn emptyCopy()
Column
public IntColumn emptyCopy(int rowSize)
Column
public void sortAscending()
sortAscending
in interface Column
public void sortDescending()
sortDescending
in interface Column
public IntColumn copy()
Column
public boolean isEmpty()
Column
public void addCell(java.lang.String object)
addCell
in interface Column
addCell
in class AbstractColumn
public static int convert(java.lang.String stringValue)
We remove any commas before parsing
public int get(int index)
get
in interface IntMapUtils
public float getFloat(int index)
getFloat
in interface NumericColumn
public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator
in interface Column
public int firstElement()
public long sum()
sum
in interface IntMapUtils
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 Selection isPositive()
public Selection isNegative()
public Selection isNonNegative()
public Selection isZero()
public Selection isEven()
public Selection isOdd()
public it.unimi.dsi.fastutil.floats.FloatArrayList toFloatArray()
public int[] toIntArray()
public double[] toDoubleArray()
toDoubleArray
in interface NumericColumn
toDoubleArray
in interface Column
public java.lang.String toString()
toString
in class java.lang.Object
public 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 FloatColumn multiply(FloatColumn column2)
public FloatColumn divide(FloatColumn column2)
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()
iterator
in interface it.unimi.dsi.fastutil.ints.IntIterable
iterator
in interface java.lang.Iterable<java.lang.Integer>
public Stats stats()
public boolean contains(int i)
public int byteSize()
Column
public byte[] asBytes(int rowNumber)
public IntColumn difference()
Column
difference
in interface Column
difference
in class AbstractColumn