Package tech.tablesaw.columns.numbers
Interface NumberMapFunctions
- All Known Subinterfaces:
NumericColumn<T>
- All Known Implementing Classes:
DoubleColumn
,FloatColumn
,IntColumn
,LongColumn
,NumberColumn
,ShortColumn
public interface NumberMapFunctions
-
Method Summary
Modifier and TypeMethodDescriptiondefault DoubleColumn
abs()
Returns a NumberColumn with the absolute value of each value in this columndefault double
add
(double val1, double val2) default DoubleColumn
default DoubleColumn
add
(NumericColumn<?> column2) double[]
default DoubleColumn
Return the elements of this column as the percentages of their value relative to the sum of all elementsdefault DoubleColumn
asRatio()
Return the elements of this column as the ratios of their value and the sum of all elementsdefault DoubleColumn
bin
(int binCount) default DoubleColumn
cube()
default DoubleColumn
cubeRoot()
default DoubleColumn
cumMax()
Returns a new column with a cumulative maximum calculateddefault DoubleColumn
cumMin()
Returns a new column with a cumulative maximum calculateddefault DoubleColumn
cumProd()
Returns a new column with a cumulative product calculateddefault DoubleColumn
cumSum()
Returns a new column with a cumulative sum calculateddefault DoubleColumn
default double
divide
(double val1, double val2) default DoubleColumn
default DoubleColumn
divide
(NumericColumn<?> column2) double
getDouble
(int i) boolean
isEmpty()
boolean
isMissing
(int rowNumber) default DoubleColumn
log10()
Returns the base 10 log of the values in this column as a NumberColumn.default DoubleColumn
log1p()
Returns the natural log of the values in this column, after adding 1 to each so that zero values don't return -Infinitydefault DoubleColumn
logN()
Returns the natural log of the values in this column as a NumberColumn.default double
multiply
(double val1, double val2) default DoubleColumn
default DoubleColumn
multiply
(NumericColumn<?> column2) name()
default DoubleColumn
neg()
For each item in the column, returns the same number with the sign changed.default DoubleColumn
Returns a transformation of the data in this column such that the result has a mean of 0, and a standard deviation of 1default DoubleColumn
Returns a new column with a percent change calculateddefault DoubleColumn
power
(double power) Returns a NumberColumn with the exponential power of each value in this columndefault DoubleColumn
power
(NumericColumn<?> powerColumn) default DoubleColumn
Returns a NumberColumn with the reciprocal (1/n) for each value n in this columndefault DoubleColumn
remainder
(double val2) default DoubleColumn
remainder
(DoubleColumn column2) default DoubleColumn
round()
default DoubleColumn
roundInt()
Returns the rounded values as a NumberColumn.int
size()
default DoubleColumn
sqrt()
default DoubleColumn
square()
Returns a NumberColumn with the square of each value in this columndefault double
subtract
(double val1, double val2) Returns the result of subtracting val2 from val1, after handling missing valuesdefault DoubleColumn
default DoubleColumn
subtract
(NumericColumn<?> column2) double
sum()
-
Method Details
-
normalize
Returns a transformation of the data in this column such that the result has a mean of 0, and a standard deviation of 1 -
name
String name() -
size
int size() -
isEmpty
boolean isEmpty() -
asDoubleArray
double[] asDoubleArray() -
asRatio
Return the elements of this column as the ratios of their value and the sum of all elements -
sum
double sum() -
asPercent
Return the elements of this column as the percentages of their value relative to the sum of all elements -
subtract
-
add
-
multiply
-
divide
-
add
-
subtract
-
divide
-
multiply
-
add
default double add(double val1, double val2) -
multiply
default double multiply(double val1, double val2) -
divide
default double divide(double val1, double val2) -
subtract
default double subtract(double val1, double val2) Returns the result of subtracting val2 from val1, after handling missing values -
power
Returns a NumberColumn with the exponential power of each value in this column -
power
-
reciprocal
Returns a NumberColumn with the reciprocal (1/n) for each value n in this column -
square
Returns a NumberColumn with the square of each value in this column -
sqrt
-
cubeRoot
-
cube
-
remainder
-
remainder
-
logN
Returns the natural log of the values in this column as a NumberColumn. -
log10
Returns the base 10 log of the values in this column as a NumberColumn. -
log1p
Returns the natural log of the values in this column, after adding 1 to each so that zero values don't return -Infinity -
round
-
roundInt
Returns the rounded values as a NumberColumn. Use roundLong() if larger- Throws:
ClassCastException
- if the returned value will not fit in an int
-
abs
Returns a NumberColumn with the absolute value of each value in this column -
neg
For each item in the column, returns the same number with the sign changed. For example: -1.3 returns 1.3, 2.135 returns -2.135 0 returns 0 -
difference
-
cumSum
Returns a new column with a cumulative sum calculated -
cumProd
Returns a new column with a cumulative product calculated -
cumMax
Returns a new column with a cumulative maximum calculated -
cumMin
Returns a new column with a cumulative maximum calculated -
pctChange
Returns a new column with a percent change calculated -
bin
-
getDouble
double getDouble(int i) -
isMissing
boolean isMissing(int rowNumber)
-