Package com.illumon.iris.libs.primitives
Class LongNumericPrimitives
java.lang.Object
com.illumon.iris.libs.primitives.LongNumericPrimitives
public class LongNumericPrimitives extends Object
A set of commonly used numeric functions that can be applied to Long types.
-
Constructor Summary
Constructors Constructor Description LongNumericPrimitives()
-
Method Summary
Modifier and Type Method Description static long
abs(long value)
Returns the absolute value.static double
absAvg(long[] values)
Returns the mean of the absolute values of values.static double
absAvg(DbLongArray values)
Returns the mean of the absolute values of values.static double
absAvg(Long... values)
Returns the mean of the absolute values of values.static double
acos(long value)
Returns the arc cosine.static double
asin(long value)
Returns the arc sine.static double
atan(long value)
Returns the arc tangent.static double
avg(long[] values)
Returns the mean.static double
avg(DbLongArray values)
Returns the mean.static double
avg(Long... values)
Returns the mean.static int
binSearchIndex(long[] values, long key, BinSearch choiceWhenEquals)
Performs a binary search to find a key.static int
binSearchIndex(DbLongArray values, long key, BinSearch choiceWhenEquals)
Performs a binary search to find a key.static double
ceil(long value)
Returns the ceiling.static long
clamp(long value, long min, long max)
Constrains the value to be on the[min,max]
range.static double
cor(long[] values0, long[] values1)
Returns the correlation.static double
cor(long[] values0, DbLongArray values1)
Returns the correlation.static double
cor(DbLongArray values0, long[] values1)
Returns the correlation.static double
cor(DbLongArray values0, DbLongArray values1)
Returns the correlation.static double
cos(long value)
Returns the cosine.static int
countNeg(long[] values)
Counts the number of negative values.static int
countNeg(DbLongArray values)
Counts the number of negative values.static int
countNeg(Long... values)
Counts the number of negative values.static int
countPos(long[] values)
Counts the number of positive values.static int
countPos(DbLongArray values)
Counts the number of positive values.static int
countPos(Long... values)
Counts the number of positive values.static int
countZero(long[] values)
Counts the number of zero values.static int
countZero(DbLongArray values)
Counts the number of zero values.static int
countZero(Long... values)
Counts the number of zero values.static double
cov(long[] values0, long[] values1)
Returns the covariance.static double
cov(long[] values0, DbLongArray values1)
Returns the covariance.static double
cov(DbLongArray values0, long[] values1)
Returns the covariance.static double
cov(DbLongArray values0, DbLongArray values1)
Returns the covariance.static long[]
cumMax(long... values)
Returns the cumulative minimum.static long[]
cumMin(long... values)
Returns the cumulative minimum.static long[]
cumprod(long[] values)
Returns the cumulative product.static long[]
cumprod(DbLongArray values)
Returns the cumulative product.static long[]
cumprod(Long... values)
Returns the cumulative product.static long[]
cumsum(long[] values)
Returns the cumulative sum.static long[]
cumsum(DbLongArray values)
Returns the cumulative sum.static long[]
cumsum(Long... values)
Returns the cumulative sum.static double
exp(long value)
Returns Euler's number e raised to a power.static int
firstIndexOf(long[] values, long val)
Returns the first index containing the value.static int
firstIndexOf(DbLongArray values, long val)
Returns the first index containing the value.static double
floor(long value)
Returns the floor.static int
indexOfMax(long[] values)
Returns the index of the maximum value.static int
indexOfMax(DbLongArray values)
Returns the index of the maximum value.static int
indexOfMax(Long... values)
Returns the index of the maximum value.static int
indexOfMin(long[] values)
Returns the index of the minimum value.static int
indexOfMin(DbLongArray values)
Returns the index of the minimum value.static int
indexOfMin(Long... values)
Returns the index of the minimum value.static double
log(long value)
Returns the natural logarithm (base e).static long
lowerBin(long value, long interval)
Returns the lower bound of the bin containing the value.static long
lowerBin(long value, long interval, long offset)
Returns the lower bound of the bin containing the value.static long
max(long[] values)
Returns the maximum.static long
max(DbLongArray values)
Returns the maximum.static long
max(Long... values)
Returns the maximum.static double
median(long[] values)
Returns the median.static double
median(DbLongArray values)
Returns the median.static double
median(Long... values)
Returns the median.static long
min(long[] values)
Returns the minimum.static long
min(DbLongArray values)
Returns the minimum.static long
min(Long... values)
Returns the minimum.static double
percentile(double percentile, long... values)
Returns the percentile.static double
percentile(double percentile, DbLongArray values)
Returns the percentile.static double
pow(long a, long b)
Returns the value of the first argument raised to the second argument.static long
product(long[] values)
Returns the product.static long
product(DbLongArray values)
Returns the product.static int
rawBinSearchIndex(long[] values, long key, BinSearch choiceWhenEquals)
Performs a binary search to find a key.static int
rawBinSearchIndex(DbLongArray values, long key, BinSearch choiceWhenEquals)
Performs a binary search to find a key.static double
rint(long value)
Returns the integer closest to the input value.static long
round(long value)
Returns the closest integer to the argument.static long[]
sequence(long start, long end, long step)
Returns a sequence of values.static long
signum(long value)
Returns the signum function.static double
sin(long value)
Returns the sine.static long[]
sort(long[] values)
Returns sorted values from smallest to largest.static DbLongArray
sort(DbLongArray values)
Returns sorted values from smallest to largest.static long[]
sort(Long... values)
Returns sorted values from smallest to largest.static long[]
sortDescending(long[] values)
Returns sorted values from largest to smallest.static DbLongArray
sortDescending(DbLongArray values)
Returns sorted values from largest to smallest.static long[]
sortDescending(Long... values)
Returns sorted values from largest to smallest.static double
sqrt(long value)
Returns the square root.static double
std(long[] values)
Returns the standard deviation.static double
std(DbLongArray values)
Returns the standard deviation.static double
std(Long... values)
Returns the standard deviation.static double
ste(long[] values)
Returns the standard error.static double
ste(DbLongArray values)
Returns the standard error.static double
ste(Long... values)
Returns the standard error.static long
sum(long[] values)
Returns the sum.static long[]
sum(long[]... values)
Returns the sum.static long[]
sum(DbArray<long[]> values)
Returns the sum.static long
sum(DbLongArray values)
Returns the sum.static double
tan(long value)
Returns the tangent.static double
tstat(long[] values)
Returns the t-statistic.static double
tstat(DbLongArray values)
Returns the t-statistic.static double
tstat(Long... values)
Returns the t-statistic.static long
upperBin(long value, long interval)
Returns the upper bound of the bin containing the value.static long
upperBin(long value, long interval, long offset)
Returns the upper bound of the bin containing the value.static double
var(long[] values)
Returns the variance.static double
var(DbLongArray values)
Returns the variance.static double
var(Long... values)
Returns the variance.static double
wavg(long[] values, double[] weights)
Returns the weighted average.static double
wavg(long[] values, float[] weights)
Returns the weighted average.static double
wavg(long[] values, int[] weights)
Returns the weighted average.static double
wavg(long[] values, long[] weights)
Returns the weighted average.static double
wavg(long[] values, short[] weights)
Returns the weighted average.static double
wavg(long[] values, DbDoubleArray weights)
Returns the weighted average.static double
wavg(long[] values, DbFloatArray weights)
Returns the weighted average.static double
wavg(long[] values, DbIntArray weights)
Returns the weighted average.static double
wavg(long[] values, DbLongArray weights)
Returns the weighted average.static double
wavg(long[] values, DbShortArray weights)
Returns the weighted average.static double
wavg(DbLongArray values, double[] weights)
Returns the weighted average.static double
wavg(DbLongArray values, float[] weights)
Returns the weighted average.static double
wavg(DbLongArray values, int[] weights)
Returns the weighted average.static double
wavg(DbLongArray values, long[] weights)
Returns the weighted average.static double
wavg(DbLongArray values, short[] weights)
Returns the weighted average.static double
wavg(DbLongArray values, DbDoubleArray weights)
Returns the weighted average.static double
wavg(DbLongArray values, DbFloatArray weights)
Returns the weighted average.static double
wavg(DbLongArray values, DbIntArray weights)
Returns the weighted average.static double
wavg(DbLongArray values, DbLongArray weights)
Returns the weighted average.static double
wavg(DbLongArray values, DbShortArray weights)
Returns the weighted average.static double
weightedAvg(long[] values, double[] weights)
Returns the weighted average.static double
weightedAvg(long[] values, float[] weights)
Returns the weighted average.static double
weightedAvg(long[] values, int[] weights)
Returns the weighted average.static double
weightedAvg(long[] values, long[] weights)
Returns the weighted average.static double
weightedAvg(long[] values, short[] weights)
Returns the weighted average.static double
weightedAvg(long[] values, DbDoubleArray weights)
Returns the weighted average.static double
weightedAvg(long[] values, DbFloatArray weights)
Returns the weighted average.static double
weightedAvg(long[] values, DbIntArray weights)
Returns the weighted average.static double
weightedAvg(long[] values, DbLongArray weights)
Returns the weighted average.static double
weightedAvg(long[] values, DbShortArray weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, double[] weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, float[] weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, int[] weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, long[] weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, short[] weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, DbDoubleArray weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, DbFloatArray weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, DbIntArray weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, DbLongArray weights)
Returns the weighted average.static double
weightedAvg(DbLongArray values, DbShortArray weights)
Returns the weighted average.static double
weightedSum(long[] values, double[] weights)
Returns the weighted sum.static double
weightedSum(long[] values, float[] weights)
Returns the weighted sum.static double
weightedSum(long[] values, int[] weights)
Returns the weighted sum.static double
weightedSum(long[] values, long[] weights)
Returns the weighted sum.static double
weightedSum(long[] values, short[] weights)
Returns the weighted sum.static double
weightedSum(long[] values, DbDoubleArray weights)
Returns the weighted sum.static double
weightedSum(long[] values, DbFloatArray weights)
Returns the weighted sum.static double
weightedSum(long[] values, DbIntArray weights)
Returns the weighted sum.static double
weightedSum(long[] values, DbLongArray weights)
Returns the weighted sum.static double
weightedSum(long[] values, DbShortArray weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, double[] weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, float[] weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, int[] weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, long[] weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, short[] weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, DbDoubleArray weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, DbFloatArray weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, DbIntArray weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, DbLongArray weights)
Returns the weighted sum.static double
weightedSum(DbLongArray values, DbShortArray weights)
Returns the weighted sum.static double
wstd(long[] values, double[] weights)
Returns the weighted standard deviation.static double
wstd(long[] values, float[] weights)
Returns the weighted standard deviation.static double
wstd(long[] values, int[] weights)
Returns the weighted standard deviation.static double
wstd(long[] values, long[] weights)
Returns the weighted standard deviation.static double
wstd(long[] values, short[] weights)
Returns the weighted standard deviation.static double
wstd(long[] values, DbDoubleArray weights)
Returns the weighted standard deviation.static double
wstd(long[] values, DbFloatArray weights)
Returns the weighted standard deviation.static double
wstd(long[] values, DbIntArray weights)
Returns the weighted standard deviation.static double
wstd(long[] values, DbLongArray weights)
Returns the weighted standard deviation.static double
wstd(long[] values, DbShortArray weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, double[] weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, float[] weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, int[] weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, long[] weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, short[] weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, DbDoubleArray weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, DbFloatArray weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, DbIntArray weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, DbLongArray weights)
Returns the weighted standard deviation.static double
wstd(DbLongArray values, DbShortArray weights)
Returns the weighted standard deviation.static double
wste(long[] values, double[] weights)
Returns the weighted standard error.static double
wste(long[] values, float[] weights)
Returns the weighted standard error.static double
wste(long[] values, int[] weights)
Returns the weighted standard error.static double
wste(long[] values, long[] weights)
Returns the weighted standard error.static double
wste(long[] values, short[] weights)
Returns the weighted standard error.static double
wste(long[] values, DbDoubleArray weights)
Returns the weighted standard error.static double
wste(long[] values, DbFloatArray weights)
Returns the weighted standard error.static double
wste(long[] values, DbIntArray weights)
Returns the weighted standard error.static double
wste(long[] values, DbLongArray weights)
Returns the weighted standard error.static double
wste(long[] values, DbShortArray weights)
Returns the weighted standard error.static double
wste(DbLongArray values, double[] weights)
Returns the weighted standard error.static double
wste(DbLongArray values, float[] weights)
Returns the weighted standard error.static double
wste(DbLongArray values, int[] weights)
Returns the weighted standard error.static double
wste(DbLongArray values, long[] weights)
Returns the weighted standard error.static double
wste(DbLongArray values, short[] weights)
Returns the weighted standard error.static double
wste(DbLongArray values, DbDoubleArray weights)
Returns the weighted standard error.static double
wste(DbLongArray values, DbFloatArray weights)
Returns the weighted standard error.static double
wste(DbLongArray values, DbIntArray weights)
Returns the weighted standard error.static double
wste(DbLongArray values, DbLongArray weights)
Returns the weighted standard error.static double
wste(DbLongArray values, DbShortArray weights)
Returns the weighted standard error.static double
wsum(long[] values, double[] weights)
Returns the weighted sum.static double
wsum(long[] values, float[] weights)
Returns the weighted sum.static double
wsum(long[] values, int[] weights)
Returns the weighted sum.static double
wsum(long[] values, long[] weights)
Returns the weighted sum.static double
wsum(long[] values, short[] weights)
Returns the weighted sum.static double
wsum(long[] values, DbDoubleArray weights)
Returns the weighted sum.static double
wsum(long[] values, DbFloatArray weights)
Returns the weighted sum.static double
wsum(long[] values, DbIntArray weights)
Returns the weighted sum.static double
wsum(long[] values, DbLongArray weights)
Returns the weighted sum.static double
wsum(long[] values, DbShortArray weights)
Returns the weighted sum.static double
wsum(DbLongArray values, double[] weights)
Returns the weighted sum.static double
wsum(DbLongArray values, float[] weights)
Returns the weighted sum.static double
wsum(DbLongArray values, int[] weights)
Returns the weighted sum.static double
wsum(DbLongArray values, long[] weights)
Returns the weighted sum.static double
wsum(DbLongArray values, short[] weights)
Returns the weighted sum.static double
wsum(DbLongArray values, DbDoubleArray weights)
Returns the weighted sum.static double
wsum(DbLongArray values, DbFloatArray weights)
Returns the weighted sum.static double
wsum(DbLongArray values, DbIntArray weights)
Returns the weighted sum.static double
wsum(DbLongArray values, DbLongArray weights)
Returns the weighted sum.static double
wsum(DbLongArray values, DbShortArray weights)
Returns the weighted sum.static double
wtstat(long[] values, double[] weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, float[] weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, int[] weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, long[] weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, short[] weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, DbDoubleArray weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, DbFloatArray weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, DbIntArray weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, DbLongArray weights)
Returns the weighted t-statistic.static double
wtstat(long[] values, DbShortArray weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, double[] weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, float[] weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, int[] weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, long[] weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, short[] weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, DbDoubleArray weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, DbFloatArray weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, DbIntArray weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, DbLongArray weights)
Returns the weighted t-statistic.static double
wtstat(DbLongArray values, DbShortArray weights)
Returns the weighted t-statistic.static double
wvar(long[] values, double[] weights)
Returns the weighted variance.static double
wvar(long[] values, float[] weights)
Returns the weighted variance.static double
wvar(long[] values, int[] weights)
Returns the weighted variance.static double
wvar(long[] values, long[] weights)
Returns the weighted variance.static double
wvar(long[] values, short[] weights)
Returns the weighted variance.static double
wvar(long[] values, DbDoubleArray weights)
Returns the weighted variance.static double
wvar(long[] values, DbFloatArray weights)
Returns the weighted variance.static double
wvar(long[] values, DbIntArray weights)
Returns the weighted variance.static double
wvar(long[] values, DbLongArray weights)
Returns the weighted variance.static double
wvar(long[] values, DbShortArray weights)
Returns the weighted variance.static double
wvar(DbLongArray values, double[] weights)
Returns the weighted variance.static double
wvar(DbLongArray values, float[] weights)
Returns the weighted variance.static double
wvar(DbLongArray values, int[] weights)
Returns the weighted variance.static double
wvar(DbLongArray values, long[] weights)
Returns the weighted variance.static double
wvar(DbLongArray values, short[] weights)
Returns the weighted variance.static double
wvar(DbLongArray values, DbDoubleArray weights)
Returns the weighted variance.static double
wvar(DbLongArray values, DbFloatArray weights)
Returns the weighted variance.static double
wvar(DbLongArray values, DbIntArray weights)
Returns the weighted variance.static double
wvar(DbLongArray values, DbLongArray weights)
Returns the weighted variance.static double
wvar(DbLongArray values, DbShortArray weights)
Returns the weighted variance.
-
Constructor Details
-
LongNumericPrimitives
public LongNumericPrimitives()
-
-
Method Details
-
countPos
Counts the number of positive values.- Parameters:
values
- values.- Returns:
- number of positive values.
-
countPos
public static int countPos(long[] values)Counts the number of positive values.- Parameters:
values
- values.- Returns:
- number of positive values.
-
countPos
Counts the number of positive values.- Parameters:
values
- values.- Returns:
- number of positive values.
-
countNeg
Counts the number of negative values.- Parameters:
values
- values.- Returns:
- number of negative values.
-
countNeg
public static int countNeg(long[] values)Counts the number of negative values.- Parameters:
values
- values.- Returns:
- number of negative values.
-
countNeg
Counts the number of negative values.- Parameters:
values
- values.- Returns:
- number of negative values.
-
countZero
Counts the number of zero values.- Parameters:
values
- values.- Returns:
- number of zero values.
-
countZero
public static int countZero(long[] values)Counts the number of zero values.- Parameters:
values
- values.- Returns:
- number of zero values.
-
countZero
Counts the number of zero values.- Parameters:
values
- values.- Returns:
- number of zero values.
-
avg
Returns the mean. Null values are excluded.- Parameters:
values
- values.- Returns:
- mean of non-null values.
-
avg
public static double avg(long[] values)Returns the mean. Null values are excluded.- Parameters:
values
- values.- Returns:
- mean of non-null values.
-
avg
Returns the mean. Null values are excluded.- Parameters:
values
- values.- Returns:
- mean of non-null values.
-
absAvg
Returns the mean of the absolute values of values. Null values are excluded.- Parameters:
values
- values.- Returns:
- mean of the absolute value of non-null values.
-
absAvg
public static double absAvg(long[] values)Returns the mean of the absolute values of values. Null values are excluded.- Parameters:
values
- values.- Returns:
- mean of the absolute value of non-null values.
-
absAvg
Returns the mean of the absolute values of values. Null values are excluded.- Parameters:
values
- values.- Returns:
- mean of the absolute value of non-null values.
-
var
Returns the variance. Null values are excluded.- Parameters:
values
- values.- Returns:
- variance of non-null values.
-
var
public static double var(long[] values)Returns the variance. Null values are excluded.- Parameters:
values
- values.- Returns:
- variance of non-null values.
-
var
Returns the variance. Null values are excluded.- Parameters:
values
- values.- Returns:
- variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
public static double wvar(long[] values, double[] weights)Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
public static double wvar(long[] values, float[] weights)Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
public static double wvar(long[] values, long[] weights)Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
public static double wvar(long[] values, int[] weights)Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
public static double wvar(long[] values, short[] weights)Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
wvar
Returns the weighted variance. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted variance of non-null values.
-
std
Returns the standard deviation. Null values are excluded.- Parameters:
values
- values.- Returns:
- standard deviation of non-null values.
-
std
public static double std(long[] values)Returns the standard deviation. Null values are excluded.- Parameters:
values
- values.- Returns:
- standard deviation of non-null values.
-
std
Returns the standard deviation. Null values are excluded.- Parameters:
values
- values.- Returns:
- standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
public static double wstd(long[] values, double[] weights)Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
public static double wstd(long[] values, float[] weights)Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
public static double wstd(long[] values, long[] weights)Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
public static double wstd(long[] values, int[] weights)Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
public static double wstd(long[] values, short[] weights)Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
wstd
Returns the weighted standard deviation. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard deviation of non-null values.
-
ste
Returns the standard error. Null values are excluded.- Parameters:
values
- values.- Returns:
- standard error of non-null values.
-
ste
public static double ste(long[] values)Returns the standard error. Null values are excluded.- Parameters:
values
- values.- Returns:
- standard error of non-null values.
-
ste
Returns the standard error. Null values are excluded.- Parameters:
values
- values.- Returns:
- standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
public static double wste(long[] values, double[] weights)Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
public static double wste(long[] values, float[] weights)Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
public static double wste(long[] values, long[] weights)Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
public static double wste(long[] values, int[] weights)Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
public static double wste(long[] values, short[] weights)Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
wste
Returns the weighted standard error. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted standard error of non-null values.
-
tstat
Returns the t-statistic. Null values are excluded.- Parameters:
values
- values.- Returns:
- t-statistic of non-null values.
-
tstat
public static double tstat(long[] values)Returns the t-statistic. Null values are excluded.- Parameters:
values
- values.- Returns:
- t-statistic of non-null values.
-
tstat
Returns the t-statistic. Null values are excluded.- Parameters:
values
- values.- Returns:
- t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
public static double wtstat(long[] values, double[] weights)Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
public static double wtstat(long[] values, float[] weights)Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
public static double wtstat(long[] values, long[] weights)Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
public static double wtstat(long[] values, int[] weights)Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
public static double wtstat(long[] values, short[] weights)Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
wtstat
Returns the weighted t-statistic. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted t-statistic of non-null values.
-
max
Returns the maximum. Null values are excluded.- Parameters:
values
- values.- Returns:
- maximum of non-null values.
-
max
public static long max(long[] values)Returns the maximum. Null values are excluded.- Parameters:
values
- values.- Returns:
- maximum of non-null values.
-
max
Returns the maximum. Null values are excluded.- Parameters:
values
- values.- Returns:
- maximum of non-null values.
-
min
Returns the minimum. Null values are excluded.- Parameters:
values
- values.- Returns:
- minimum of non-null values.
-
min
public static long min(long[] values)Returns the minimum. Null values are excluded.- Parameters:
values
- values.- Returns:
- minimum of non-null values.
-
min
Returns the minimum. Null values are excluded.- Parameters:
values
- values.- Returns:
- minimum of non-null values.
-
median
Returns the median.- Parameters:
values
- values.- Returns:
- median.
-
median
public static double median(long[] values)Returns the median.- Parameters:
values
- values.- Returns:
- median.
-
median
Returns the median.- Parameters:
values
- values.- Returns:
- median.
-
percentile
public static double percentile(double percentile, long... values)Returns the percentile.- Parameters:
percentile
- percentile to compute.values
- values.- Returns:
- percentile.
-
percentile
Returns the percentile.- Parameters:
percentile
- percentile to compute.values
- values.- Returns:
- percentile.
-
firstIndexOf
public static int firstIndexOf(long[] values, long val)Returns the first index containing the value.- Parameters:
values
- values.val
- value to search for.- Returns:
- first index containing the value or null, if the value is not present.
-
firstIndexOf
Returns the first index containing the value.- Parameters:
values
- values.val
- value to search for.- Returns:
- first index containing the value or null, if the value is not present.
-
indexOfMax
Returns the index of the maximum value.- Parameters:
values
- values.- Returns:
- index of the maximum value.
-
indexOfMax
public static int indexOfMax(long[] values)Returns the index of the maximum value.- Parameters:
values
- values.- Returns:
- index of the maximum value.
-
indexOfMax
Returns the index of the maximum value.- Parameters:
values
- values.- Returns:
- index of the maximum value.
-
indexOfMin
Returns the index of the minimum value.- Parameters:
values
- values.- Returns:
- index of the minimum value.
-
indexOfMin
public static int indexOfMin(long[] values)Returns the index of the minimum value.- Parameters:
values
- values.- Returns:
- index of the minimum value.
-
indexOfMin
Returns the index of the minimum value.- Parameters:
values
- values.- Returns:
- index of the minimum value.
-
binSearchIndex
Performs a binary search to find a key.- Parameters:
values
- sorted values to search.key
- key to search for.choiceWhenEquals
- algorithm used to resolve ties when performing a binary search.- Returns:
- index of the search key, if it is contained in the array; otherwise, the index immediately before where the key would be inserted.
-
binSearchIndex
Performs a binary search to find a key.- Parameters:
values
- sorted values to search.key
- key to search for.choiceWhenEquals
- algorithm used to resolve ties when performing a binary search.- Returns:
- index of the search key, if it is contained in the array; otherwise, the index immediately before where the key would be inserted.
-
rawBinSearchIndex
Performs a binary search to find a key.- Parameters:
values
- sorted values to search.key
- key to search for.choiceWhenEquals
- algorithm used to resolve ties when performing a binary search.- Returns:
- index of the search key, if it is contained in the array; otherwise,
(-(insertion point) - 1)
.
-
rawBinSearchIndex
Performs a binary search to find a key.- Parameters:
values
- sorted values to search.key
- key to search for.choiceWhenEquals
- algorithm used to resolve ties when performing a binary search.- Returns:
- index of the search key, if it is contained in the array; otherwise,
(-(insertion point) - 1)
.
-
cov
Returns the covariance. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- covariance of non-null values.
-
cov
Returns the covariance. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- covariance of non-null values.
-
cov
public static double cov(long[] values0, long[] values1)Returns the covariance. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- covariance of non-null values.
-
cov
Returns the covariance. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- covariance of non-null values.
-
cor
Returns the correlation. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- correlation of non-null values.
-
cor
Returns the correlation. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- correlation of non-null values.
-
cor
public static double cor(long[] values0, long[] values1)Returns the correlation. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- correlation of non-null values.
-
cor
Returns the correlation. Null values are excluded.- Parameters:
values0
- 1st set of values.values1
- 2nd set of values.- Returns:
- correlation of non-null values.
-
sum
Returns the sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- sum of non-null values.
-
sum
public static long sum(long[] values)Returns the sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- sum of non-null values.
-
sum
Returns the sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- array of sums of non-null values.
-
sum
public static long[] sum(long[]... values)Returns the sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- array of sums of non-null values.
-
product
Returns the product. Null values are excluded.- Parameters:
values
- values.- Returns:
- product of non-null values.
-
product
public static long product(long[] values)Returns the product. Null values are excluded.- Parameters:
values
- values.- Returns:
- product of non-null values.
-
cumMin
public static long[] cumMin(long... values)Returns the cumulative minimum. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative sum of non-null values.
-
cumMax
public static long[] cumMax(long... values)Returns the cumulative minimum. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative sum of non-null values.
-
cumsum
Returns the cumulative sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative sum of non-null values.
-
cumsum
public static long[] cumsum(long[] values)Returns the cumulative sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative sum of non-null values.
-
cumsum
Returns the cumulative sum. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative sum of non-null values.
-
cumprod
Returns the cumulative product. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative product of non-null values.
-
cumprod
public static long[] cumprod(long[] values)Returns the cumulative product. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative product of non-null values.
-
cumprod
Returns the cumulative product. Null values are excluded.- Parameters:
values
- values.- Returns:
- cumulative product of non-null values.
-
abs
public static long abs(long value)Returns the absolute value.- Parameters:
value
- value.- Returns:
- absolute value.
-
acos
public static double acos(long value)Returns the arc cosine.- Parameters:
value
- value.- Returns:
- arc cosine.
-
asin
public static double asin(long value)Returns the arc sine.- Parameters:
value
- value.- Returns:
- arc sine.
-
atan
public static double atan(long value)Returns the arc tangent.- Parameters:
value
- value.- Returns:
- arc tangent.
-
ceil
public static double ceil(long value)Returns the ceiling. This is the smallest integer, which is greater than or equal to the value.- Parameters:
value
- value.- Returns:
- ceiling.
-
cos
public static double cos(long value)Returns the cosine.- Parameters:
value
- value.- Returns:
- cosine.
-
exp
public static double exp(long value)Returns Euler's number e raised to a power.- Parameters:
value
- value.- Returns:
- Euler's number e raised to a power.
-
floor
public static double floor(long value)Returns the floor. This is the largest integer, which is less than or equal to the value.- Parameters:
value
- value.- Returns:
- floor.
-
log
public static double log(long value)Returns the natural logarithm (base e).- Parameters:
value
- value.- Returns:
- natural logarithm (base e).
-
pow
public static double pow(long a, long b)Returns the value of the first argument raised to the second argument.- Parameters:
a
- the base.b
- the exponent.- Returns:
a
raised to theb
power.
-
rint
public static double rint(long value)Returns the integer closest to the input value.- Parameters:
value
- value.- Returns:
- integer closes to the input value.
-
round
public static long round(long value)Returns the closest integer to the argument. If the argument is NaN, the result is 0. If the argument is greater thanInteger.MIN_VALUE
,Integer.MIN_VALUE
is returned. If the argument is less thanInteger.MAX_VALUE
,Integer.MAX_VALUE
is returned.- Parameters:
value
- value.
-
signum
public static long signum(long value)Returns the signum function.- Parameters:
value
- value.- Returns:
- signum function.
-
sin
public static double sin(long value)Returns the sine.- Parameters:
value
- value.- Returns:
- sine.
-
sqrt
public static double sqrt(long value)Returns the square root.- Parameters:
value
- value.- Returns:
- square root.
-
tan
public static double tan(long value)Returns the tangent.- Parameters:
value
- value.- Returns:
- tangent.
-
lowerBin
public static long lowerBin(long value, long interval)Returns the lower bound of the bin containing the value.- Parameters:
value
- value.interval
- bin width.- Returns:
- lower bound of the bin containing the value.
-
lowerBin
public static long lowerBin(long value, long interval, long offset)Returns the lower bound of the bin containing the value.- Parameters:
value
- value.interval
- bin width.offset
- interval offset- Returns:
- lower bound of the bin containing the value.
-
upperBin
public static long upperBin(long value, long interval)Returns the upper bound of the bin containing the value.- Parameters:
value
- value.interval
- bin width.- Returns:
- upper bound of the bin containing the value.
-
upperBin
public static long upperBin(long value, long interval, long offset)Returns the upper bound of the bin containing the value.- Parameters:
value
- value.interval
- bin width.offset
- interval offset- Returns:
- upper bound of the bin containing the value.
-
clamp
public static long clamp(long value, long min, long max)Constrains the value to be on the[min,max]
range. If the value is less thanmin
,min
is returned. If the value is greater thanmax
,max
is returned.- Parameters:
value
- value.min
- minimum value.max
- maximum value.- Returns:
- value constrained to be in the
[min,max]
range.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
public static double wsum(long[] values, long[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
public static double weightedSum(long[] values, long[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
public static double wsum(long[] values, short[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
public static double weightedSum(long[] values, short[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
public static double wsum(long[] values, double[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
public static double weightedSum(long[] values, double[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
public static double wsum(long[] values, float[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
public static double weightedSum(long[] values, float[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
public static double wsum(long[] values, int[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wsum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
public static double weightedSum(long[] values, int[] weights)Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
weightedSum
Returns the weighted sum. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted sum of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
public static double wavg(long[] values, double[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
public static double weightedAvg(long[] values, double[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
public static double wavg(long[] values, float[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
public static double weightedAvg(long[] values, float[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
public static double wavg(long[] values, long[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
public static double weightedAvg(long[] values, long[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
public static double wavg(long[] values, int[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
public static double weightedAvg(long[] values, int[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
public static double wavg(long[] values, short[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
wavg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
public static double weightedAvg(long[] values, short[] weights)Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
weightedAvg
Returns the weighted average. Null values are excluded.- Parameters:
values
- values.weights
- weights- Returns:
- weighted average of non-null values.
-
sort
Returns sorted values from smallest to largest.- Parameters:
values
- values.- Returns:
- sorted values.
-
sort
public static long[] sort(long[] values)Returns sorted values from smallest to largest.- Parameters:
values
- values.- Returns:
- sorted values.
-
sort
Returns sorted values from smallest to largest.- Parameters:
values
- values.- Returns:
- sorted values.
-
sortDescending
Returns sorted values from largest to smallest.- Parameters:
values
- values.- Returns:
- sorted values.
-
sortDescending
public static long[] sortDescending(long[] values)Returns sorted values from largest to smallest.- Parameters:
values
- values.- Returns:
- sorted values.
-
sortDescending
Returns sorted values from largest to smallest.- Parameters:
values
- values.- Returns:
- sorted values.
-
sequence
public static long[] sequence(long start, long end, long step)Returns a sequence of values.- Parameters:
start
- starting value.end
- terminal value.step
- step size.- Returns:
- sequence of values from start to end.
-