public class LongColumn extends AbstractColumn implements LongMapUtils, NumericColumn
Modifier and Type | Field and Description |
---|---|
static long |
MISSING_VALUE |
isEqualTo, isEven, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isMissing, isNegative, isNonNegative, isNotEqualTo, isNotMissing, isOdd, isPositive, isZero
Constructor and Description |
---|
LongColumn(ColumnMetadata metadata) |
LongColumn(String name) |
LongColumn(String name,
int initialSize) |
LongColumn(String name,
long[] arr) |
Modifier and Type | Method and Description |
---|---|
void |
append(Column column) |
void |
append(long i) |
LongColumn |
append(LongColumn column2) |
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() |
it.unimi.dsi.fastutil.longs.LongSet |
asSet() |
it.unimi.dsi.fastutil.longs.LongArrayList |
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(long value) |
static long |
convert(String stringValue)
Returns a float that is parsed from the given String
|
LongColumn |
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.
|
LongColumn |
cumProd()
Returns a new column with a cumulative product calculated
|
LongColumn |
cumSum()
Returns a new column with a cumulative sum calculated
|
it.unimi.dsi.fastutil.longs.LongArrayList |
data() |
LongColumn |
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.
|
LongColumn |
emptyCopy()
Returns a copy of the receiver with no data.
|
LongColumn |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size.
|
long |
firstElement() |
double |
geometricMean() |
long |
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. |
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(long i) |
Selection |
isEqualTo(LongColumn f) |
Selection |
isEven() |
Selection |
isGreaterThan(long i) |
Selection |
isGreaterThan(LongColumn f) |
Selection |
isGreaterThanOrEqualTo(long i) |
Selection |
isLessThan(long i) |
Selection |
isLessThan(LongColumn f) |
Selection |
isLessThanOrEqualTo(long f) |
Selection |
isMissing() |
protected static boolean |
isMissing(long value) |
Selection |
isNegative() |
Selection |
isNonNegative() |
Selection |
isNotEqualTo(long i) |
Selection |
isNotMissing() |
Selection |
isOdd() |
Selection |
isPositive() |
Selection |
isZero() |
it.unimi.dsi.fastutil.longs.LongIterator |
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() |
LongColumn |
remainder(LongColumn column2) |
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator() |
Selection |
select(LongBiPredicate predicate,
long valueToCompareAgainst) |
Selection |
select(LongPredicate predicate) |
LongColumn |
select(Selection selection) |
LongColumn |
selectIf(LongPredicate predicate) |
void |
set(int index,
long value) |
void |
set(long 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_000_000_000, myColumn.isMissing()); // no more missing values
|
int |
size() |
double |
skewness() |
void |
sortAscending() |
void |
sortDescending() |
double |
standardDeviation() |
Stats |
stats() |
long |
sum() |
Table |
summary() |
double |
sumOfLogs() |
double |
sumOfSquares() |
it.unimi.dsi.fastutil.longs.LongArrayList |
top(int n)
Returns the largest ("top") n values in the column
|
String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
LongColumn |
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, names, plus
columnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, rolling, setComment, setName, subset, title
spliterator
add, add, addColumns, divide, divide, divideColumns, getInt, multiply, multiply, multiplyColumns, subtract, subtract, subtractColumns
public LongColumn(String name)
public LongColumn(String name, int initialSize)
public LongColumn(String name, long[] arr)
public LongColumn(ColumnMetadata metadata)
protected static boolean isMissing(long value)
public static long convert(String stringValue)
We remove any commas before parsing
public it.unimi.dsi.fastutil.longs.LongArrayList data()
public ColumnType type()
Column
type
in interface Column
ColumnType
public void append(long i)
public void set(int index, long value)
public void set(long newValue, Selection rowSelection)
public Selection isLessThan(long i)
public Selection isGreaterThan(long i)
public Selection isGreaterThanOrEqualTo(long i)
public Selection isLessThanOrEqualTo(long f)
public Selection isEqualTo(long i)
public Selection isNotEqualTo(long i)
public Selection isEqualTo(LongColumn f)
public Selection isGreaterThan(LongColumn f)
public Selection isLessThan(LongColumn f)
public Stats stats()
public int countUnique()
Column
countUnique
in interface Column
public LongColumn unique()
Column
public LongColumn remainder(LongColumn column2)
public LongColumn append(LongColumn column2)
public String getString(int row)
Column
public LongColumn emptyCopy()
Column
public LongColumn emptyCopy(int rowSize)
Column
public void sortAscending()
sortAscending
in interface Column
public void sortDescending()
sortDescending
in interface Column
public LongColumn copy()
Column
public int countMissing()
countMissing
in interface Column
public boolean isEmpty()
Column
public void appendCell(String object)
appendCell
in interface Column
appendCell
in class AbstractColumn
public long get(int index)
get
in interface LongMapUtils
public long getLong(int index)
NumericColumn
index
position in the column. A conversion, if needed, could result
in data or accuracy loss.getLong
in interface NumericColumn
index
- position in columnpublic double getDouble(int index)
NumericColumn
index
position in the column. A conversion, if needed, could result
in data or accuracy loss.getDouble
in interface NumericColumn
index
- position in columnpublic float getFloat(int index)
NumericColumn
index
position in the column. A conversion, if needed, could result
in data or accuracy loss.getFloat
in interface NumericColumn
index
- position in columnpublic it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator
in interface Column
public long sum()
sum
in interface LongMapUtils
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 long firstElement()
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 asFloatArray()
public LongColumn select(Selection selection)
public LongColumn selectIf(LongPredicate predicate)
public it.unimi.dsi.fastutil.longs.LongArrayList 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.longs.LongArrayList 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.longs.LongIterator iterator()
public Selection select(LongPredicate predicate)
public Selection select(LongBiPredicate predicate, long valueToCompareAgainst)
public double[] asDoubleArray()
asDoubleArray
in interface NumericColumn
asDoubleArray
in interface Column
public it.unimi.dsi.fastutil.longs.LongSet asSet()
public boolean contains(long value)
public Selection isNotMissing()
isNotMissing
in interface Column
public int byteSize()
Column
public byte[] asBytes(int rowNumber)
public LongColumn difference()
Column
difference
in interface Column
difference
in class AbstractColumn
Column
public LongColumn cumSum()
public LongColumn cumProd()
public DoubleColumn pctChange()
Copyright © 2018. All rights reserved.