public class Lists extends Object
Some of these resemble similar functions in the Arrays
class,
and in some cases are interchangeable, but these are easier to use
on non-array values because you don't have to explicitly wrap up
lists of arguments as an array.
However, for implementation reasons, most of the functions defined here
can be used on values which are already double[]
arrays
(for instance array-valued columns) rather than as comma-separated
lists of floating point values.
Modifier and Type | Method and Description |
---|---|
static int |
countTrue(boolean... values)
Returns the number of true values in a list of boolean arguments.
|
static double |
max(double... values)
Returns the maximum of all the non-blank supplied arguments.
|
static double |
mean(double... values)
Returns the mean of all the non-blank supplied arguments.
|
static double |
median(double... values)
Returns the median of all the non-blank supplied arguments.
|
static double |
min(double... values)
Returns the minimum of all the non-blank supplied arguments.
|
static double |
stdev(double... values)
Returns the population standard deviation of the non-blank supplied
arguments.
|
static double |
sum(double... values)
Returns the sum of all the non-blank supplied arguments.
|
static double |
variance(double... values)
Returns the population variance of the non-blank supplied arguments.
|
public static double sum(double... values)
values
- one or more numeric valuesvalues
public static double mean(double... values)
values
- one or more numeric valuesvalues
public static double variance(double... values)
values
- one or more numeric valuesvalues
public static double stdev(double... values)
values
- one or more numeric valuesvalues
public static double min(double... values)
values
- one or more numeric valuesvalues
public static double max(double... values)
values
- one or more numeric valuesvalues
public static double median(double... values)
values
- one or more numeric valuesvalues
public static int countTrue(boolean... values)
values
- one or more true/false valuesvalues
that are trueCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.