|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gephi.utils.StatisticsUtils
public class StatisticsUtils
Class with some statistics methods for calculating values such as the average, median, sum, max and min of a list of numbers.
Constructor Summary | |
---|---|
StatisticsUtils()
|
Method Summary | |
---|---|
static java.math.BigDecimal |
average(java.util.Collection<java.lang.Number> numbers)
Get average calculation of various numbers as a BigDecimal Null values will not be counted. |
static java.math.BigDecimal |
average(java.lang.Number[] numbers)
Get average calculation of various numbers as a BigDecimal Null values will not be counted. |
static java.math.BigDecimal[] |
getAllStatistics(java.util.Collection<java.lang.Number> numbers)
Calculates all statistics and returns them in a BigDecimal numbers array. |
static java.math.BigDecimal[] |
getAllStatistics(java.lang.Number[] numbers)
Calculates all statistics and returns them in a BigDecimal numbers array. |
static java.math.BigDecimal |
maxValue(java.util.Collection<java.lang.Number> numbers)
Get the maximum value of a collection of Number elements as a BigDecimal. |
static java.math.BigDecimal |
maxValue(java.lang.Number[] numbers)
Get the maximum value of an array of Number elements as a BigDecimal. |
static java.math.BigDecimal |
median(java.util.Collection<java.lang.Number> numbers)
Calculate median of various numbers as a BigDecimal. |
static java.math.BigDecimal |
median(java.lang.Number[] numbers)
Calculate median of various numbers as a BigDecimal. |
static java.math.BigDecimal |
minValue(java.util.Collection<java.lang.Number> numbers)
Get the minimum value of a collection of Number elements as a BigDecimal. |
static java.math.BigDecimal |
minValue(java.lang.Number[] numbers)
Get the minimum value of an array of Number elements as a BigDecimal. |
static java.math.BigDecimal[] |
numbersArrayToSortedBigDecimalArray(java.lang.Number[] numbers)
Takes an array of numbers of any type combination and returns an array with their BigDecimal equivalent numbers. |
static java.math.BigDecimal |
quartile1(java.util.Collection<java.lang.Number> numbers)
Calculate first quartile (Q1) of various numbers as a BigDecimal. |
static java.math.BigDecimal |
quartile1(java.lang.Number[] numbers)
Calculate first quartile (Q1) of various numbers as a BigDecimal. |
static java.math.BigDecimal |
quartile3(java.util.Collection<java.lang.Number> numbers)
Calculate third quartile (Q3) of various numbers as a BigDecimal. |
static java.math.BigDecimal |
quartile3(java.lang.Number[] numbers)
Calculate third quartile (Q3) of various numbers as a BigDecimal. |
static java.math.BigDecimal |
sum(java.util.Collection<java.lang.Number> numbers)
Get sum of various numbers as a BigDecimal Null values will not be counted. |
static java.math.BigDecimal |
sum(java.lang.Number[] numbers)
Get sum of various numbers as a BigDecimal Null values will not be counted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatisticsUtils()
Method Detail |
---|
public static java.math.BigDecimal average(java.lang.Number[] numbers)
Get average calculation of various numbers as a BigDecimal
Null values will not be counted.
numbers
- Numbers to calculate average
public static java.math.BigDecimal average(java.util.Collection<java.lang.Number> numbers)
Get average calculation of various numbers as a BigDecimal
Null values will not be counted.
numbers
- Numbers to calculate average
public static java.math.BigDecimal median(java.lang.Number[] numbers)
Calculate median of various numbers as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Not null numbers to calculate median
public static java.math.BigDecimal median(java.util.Collection<java.lang.Number> numbers)
Calculate median of various numbers as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Not null numbers to calculate median
public static java.math.BigDecimal quartile1(java.lang.Number[] numbers)
Calculate first quartile (Q1) of various numbers as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Not null numbers to calculate Q1
public static java.math.BigDecimal quartile1(java.util.Collection<java.lang.Number> numbers)
Calculate first quartile (Q1) of various numbers as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Not null numbers to calculate Q1
public static java.math.BigDecimal quartile3(java.lang.Number[] numbers)
Calculate third quartile (Q3) of various numbers as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Not null numbers to calculate Q3
public static java.math.BigDecimal quartile3(java.util.Collection<java.lang.Number> numbers)
Calculate third quartile (Q3) of various numbers as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Not null numbers to calculate Q3
public static java.math.BigDecimal sum(java.lang.Number[] numbers)
Get sum of various numbers as a BigDecimal
Null values will not be counted.
numbers
- Numbers to calculate sum
public static java.math.BigDecimal sum(java.util.Collection<java.lang.Number> numbers)
Get sum of various numbers as a BigDecimal
Null values will not be counted.
numbers
- Numbers to calculate sum
public static java.math.BigDecimal minValue(java.lang.Number[] numbers)
Get the minimum value of an array of Number elements as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Numbers to get min
public static java.math.BigDecimal minValue(java.util.Collection<java.lang.Number> numbers)
Get the minimum value of a collection of Number elements as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Numbers to get min
public static java.math.BigDecimal maxValue(java.lang.Number[] numbers)
Get the maximum value of an array of Number elements as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Numbers to get max
public static java.math.BigDecimal maxValue(java.util.Collection<java.lang.Number> numbers)
Get the maximum value of a collection of Number elements as a BigDecimal.
The elements can't be null.
The elements don't need to be sorted.
numbers
- Numbers to get max
public static java.math.BigDecimal[] getAllStatistics(java.lang.Number[] numbers)
Calculates all statistics and returns them in a BigDecimal
numbers array.
Using this will be faster than calling all statistics separately.
Returns an array of length=8 of BigDecimal
numbers with the results in the following order:
The elements can't be null.
The elements don't need to be sorted.
numbers
- Numbers to get all statistics
public static java.math.BigDecimal[] getAllStatistics(java.util.Collection<java.lang.Number> numbers)
Calculates all statistics and returns them in a BigDecimal
numbers array.
Using this will be faster than calling all statistics separately.
Returns an array of length=8 of BigDecimal
numbers with the results in the following order:
The elements can't be null.
The elements don't need to be sorted.
numbers
- Numbers to get all statistics
public static java.math.BigDecimal[] numbersArrayToSortedBigDecimalArray(java.lang.Number[] numbers)
Takes an array of numbers of any type combination and returns an array with their BigDecimal equivalent numbers.
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |