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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DoubleColumnabs()Returns a NumberColumn with the absolute value of each value in this columndefault doubleadd(double val1, double val2)default DoubleColumnadd(Number value)default DoubleColumnadd(NumericColumn<?> column2)double[]asDoubleArray()default DoubleColumnasPercent()Return the elements of this column as the percentages of their value relative to the sum of all elementsdefault DoubleColumnasRatio()Return the elements of this column as the ratios of their value and the sum of all elementsdefault DoubleColumnbin(int binCount)default DoubleColumncube()default DoubleColumncubeRoot()default DoubleColumncumMax()Returns a new column with a cumulative maximum calculateddefault DoubleColumncumMin()Returns a new column with a cumulative maximum calculateddefault DoubleColumncumProd()Returns a new column with a cumulative product calculateddefault DoubleColumncumSum()Returns a new column with a cumulative sum calculateddefault DoubleColumndifference()default doubledivide(double val1, double val2)default DoubleColumndivide(Number value)default DoubleColumndivide(NumericColumn<?> column2)doublegetDouble(int i)booleanisEmpty()booleanisMissing(int rowNumber)default DoubleColumnlog10()Returns the base 10 log of the values in this column as a NumberColumn.default DoubleColumnlog1p()Returns the natural log of the values in this column, after adding 1 to each so that zero values don't return -Infinitydefault DoubleColumnlogN()Returns the natural log of the values in this column as a NumberColumn.default doublemultiply(double val1, double val2)default DoubleColumnmultiply(Number value)default DoubleColumnmultiply(NumericColumn<?> column2)Stringname()default DoubleColumnneg()For each item in the column, returns the same number with the sign changed.default DoubleColumnnormalize()Returns a transformation of the data in this column such that the result has a mean of 0, and a standard deviation of 1default DoubleColumnpctChange()Returns a new column with a percent change calculateddefault DoubleColumnpower(double power)Returns a NumberColumn with the exponential power of each value in this columndefault DoubleColumnpower(NumericColumn<?> powerColumn)default DoubleColumnreciprocal()Returns a NumberColumn with the reciprocal (1/n) for each value n in this columndefault DoubleColumnremainder(double val2)default DoubleColumnremainder(DoubleColumn column2)default DoubleColumnround()default DoubleColumnroundInt()Returns the rounded values as a NumberColumn.intsize()default DoubleColumnsqrt()default DoubleColumnsquare()Returns a NumberColumn with the square of each value in this columndefault doublesubtract(double val1, double val2)Returns the result of subtracting val2 from val1, after handling missing valuesdefault DoubleColumnsubtract(Number value)default DoubleColumnsubtract(NumericColumn<?> column2)doublesum()
-
-
-
Method Detail
-
normalize
default DoubleColumn 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
default DoubleColumn asRatio()
Return the elements of this column as the ratios of their value and the sum of all elements
-
sum
double sum()
-
asPercent
default DoubleColumn asPercent()
Return the elements of this column as the percentages of their value relative to the sum of all elements
-
subtract
default DoubleColumn subtract(NumericColumn<?> column2)
-
add
default DoubleColumn add(NumericColumn<?> column2)
-
multiply
default DoubleColumn multiply(NumericColumn<?> column2)
-
divide
default DoubleColumn divide(NumericColumn<?> column2)
-
add
default DoubleColumn add(Number value)
-
subtract
default DoubleColumn subtract(Number value)
-
divide
default DoubleColumn divide(Number value)
-
multiply
default DoubleColumn multiply(Number value)
-
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
default DoubleColumn power(double power)
Returns a NumberColumn with the exponential power of each value in this column
-
power
default DoubleColumn power(NumericColumn<?> powerColumn)
-
reciprocal
default DoubleColumn reciprocal()
Returns a NumberColumn with the reciprocal (1/n) for each value n in this column
-
square
default DoubleColumn square()
Returns a NumberColumn with the square of each value in this column
-
sqrt
default DoubleColumn sqrt()
-
cubeRoot
default DoubleColumn cubeRoot()
-
cube
default DoubleColumn cube()
-
remainder
default DoubleColumn remainder(DoubleColumn column2)
-
remainder
default DoubleColumn remainder(double val2)
-
logN
default DoubleColumn logN()
Returns the natural log of the values in this column as a NumberColumn.
-
log10
default DoubleColumn log10()
Returns the base 10 log of the values in this column as a NumberColumn.
-
log1p
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 -Infinity
-
round
default DoubleColumn round()
-
roundInt
default DoubleColumn 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
default DoubleColumn abs()
Returns a NumberColumn with the absolute value of each value in this column
-
neg
default DoubleColumn 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
default DoubleColumn difference()
-
cumSum
default DoubleColumn cumSum()
Returns a new column with a cumulative sum calculated
-
cumProd
default DoubleColumn cumProd()
Returns a new column with a cumulative product calculated
-
cumMax
default DoubleColumn cumMax()
Returns a new column with a cumulative maximum calculated
-
cumMin
default DoubleColumn cumMin()
Returns a new column with a cumulative maximum calculated
-
pctChange
default DoubleColumn pctChange()
Returns a new column with a percent change calculated
-
bin
default DoubleColumn bin(int binCount)
-
getDouble
double getDouble(int i)
-
isMissing
boolean isMissing(int rowNumber)
-
-