Schnittstelle IStatisticalConainer<E>
- Typparameter:
E- is the type of the elements aIStatisticalConainer.
- Alle bekannten Unterschnittstellen:
IArrayList<E>,ICachingContainer<E>,IContainer<E>,ILinkedList<E>,IMatrix<E>,ISqlRecord
- Alle bekannten Implementierungsklassen:
ArrayList,ArrayView,CachingContainer,Container,ContainerView,ContainerView,FilterContainerView,ImmutableList,IterableView,LinkedList,Matrix,MatrixColumn,MatrixRow,MultiContainerView,SqlRecord
public interface IStatisticalConainer<E>
- Version:
- 2023-10-30
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdoublegetAverage(Function<E, Number> valueMapper) doublegetAverageOrZero(Function<E, Number> valueMapper) <C extends Comparable<C>>
CdoublegetMaxOrZero(Function<E, Number> numberMapper) doubledoublegetMedianOrZero(Function<E, Number> numberMapper) <C extends Comparable<C>>
CdoublegetMinOrZero(Function<E, Number> numberMapper) doublegetStandardDeviation(Function<E, Number> numberMapper) getSumOfInts(ToIntFunction<E> intMapper) doublegetVariance(Function<E, Number> numberMapper)
-
Methodendetails
-
getAverage
- Parameter:
valueMapper-- Gibt zurück:
- the average of the values the given valueMapper maps from the
elements of the current
IStatisticalConainer. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given valueMapper is null.RuntimeException- if the currentIStatisticalConaineris empty.
-
getAverageOrZero
- Parameter:
valueMapper-- Gibt zurück:
- the average of the values the given valueMapper maps from the
elements of the current
IStatisticalConainerif the currentIStatisticalConainercontains any, 0.0 otherwise. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given valueMapper is null.
-
getMax
- Typparameter:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentIStatisticalConainer.- Parameter:
comparableMapper-- Gibt zurück:
- the biggest
Comparablethe given comparableMapper maps from the elements of the currentIStatisticalConainer. Ignores null elements. - Löst aus:
RuntimeException- if the given comparableMapper is null.RuntimeException- if the currentIStatisticalConainerdoes not contain a non-null element.
-
getMaxOrZero
- Parameter:
numberMapper-- Gibt zurück:
- the biggest number the given numberMapper maps from the non-null
elements of the current
IStatisticalConainerif the currentIStatisticalConainercontains non-null elements, 0.0 otherwise.
-
getMedian
- Parameter:
numberMapper-- Gibt zurück:
- the median of the numbers the given numberMapper maps from the
elements of the current
IStatisticalConainer. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given numberMapper is null.RuntimeException- if the currentIStatisticalConaineris empty.
-
getMedianOrZero
- Parameter:
numberMapper-- Gibt zurück:
- the median of the numbers the given numberMapper maps from the
elements of the current
IStatisticalConainerif the currentIStatisticalConaineris not empty, 0.0 otherwise. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given numberMapper is null.
-
getMin
- Typparameter:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentIStatisticalConainer.- Parameter:
comparableMapper-- Gibt zurück:
- the smallest
Comparablethe given comparableMapper maps from the elements of the currentIStatisticalConainer. Ignores null elements. - Löst aus:
RuntimeException- if the given comparableMapper is null.RuntimeException- if the currentIStatisticalConainerdoes not contain a non-null element.
-
getMinOrZero
- Parameter:
numberMapper-- Gibt zurück:
- the smallest number the given numberMapper maps from the non-null
elements of the current
IStatisticalConainerif the currentIStatisticalConainercontains non-null elements, 0.0 otherwise.
-
getStandardDeviation
- Parameter:
numberMapper-- Gibt zurück:
- the standard deviation of the numbers the given numberMapper maps
from the elements of the current
IStatisticalConainer. - Löst aus:
RuntimeException- if the given numberMapper is null.RuntimeException- if the currentIStatisticalConaineris empty.
-
getSum
- Parameter:
valueMapper-- Gibt zurück:
- the sum of the values the given valueMapper maps from the elements of
the current
IStatisticalConainer. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given valueMapper is null.
-
getSumOfInts
- Parameter:
intMapper-- Gibt zurück:
- the sum of the ints the given intMapper maps from the elements of the
current
IStatisticalConainer. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given intMapper is null.
-
getVariance
- Parameter:
numberMapper-- Gibt zurück:
- the variance of the numbers the given numberMapper maps from the
elements of the current
IStatisticalConainer. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given numberMapper is null.RuntimeException- if the currentIStatisticalConaineris empty.
-