|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.tum.cs.commons.math.MathUtils
public class MathUtils
Collection of math utility methods.
| Constructor Summary | |
|---|---|
MathUtils()
|
|
| Method Summary | |
|---|---|
static double |
aggregate(Collection<? extends Number> values,
EAggregationStrategy aggregation)
Aggregate collections of values with a given aggregation strategy. |
static long |
factorial(int n)
Computes the factorial of n. |
static boolean |
isNormal(double number)
Checks if the provided number is neither infinite nor NaN. |
static double |
max(Collection<? extends Number> collection)
Find maximum. |
static double |
mean(Collection<? extends Number> collection)
Find mean. |
static double |
median(Collection<? extends Number> collection)
Find median. |
static double |
min(Collection<? extends Number> collection)
Find minimum. |
static double |
sum(Collection<? extends Number> collection)
Sum values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MathUtils()
| Method Detail |
|---|
public static double sum(Collection<? extends Number> collection)
SumAggregator,
EAggregationStrategy.SUMpublic static double max(Collection<? extends Number> collection)
MaxAggregator,
EAggregationStrategy.MAXpublic static double min(Collection<? extends Number> collection)
MinAggregator,
EAggregationStrategy.MINpublic static double mean(Collection<? extends Number> collection)
Double.NaN for empty input collectionMeanAggregator,
EAggregationStrategy.MEANpublic static double median(Collection<? extends Number> collection)
Double.NaN for empty input collectionMedianAggregator,
EAggregationStrategy.MEDIAN
public static double aggregate(Collection<? extends Number> values,
EAggregationStrategy aggregation)
Double.NaN for
empty input collectionspublic static long factorial(int n)
public static boolean isNormal(double number)
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||