Package kieker.analysis.util
Class RunningMedian<T extends java.lang.Comparable<T>>
java.lang.Object
kieker.analysis.util.RunningMedian<T>
- Type Parameters:
T
- Type of elements the median should be calculated for
public class RunningMedian<T extends java.lang.Comparable<T>>
extends java.lang.Object
This class represents a median that changes in the course of time. Whenever a new element is added the median changes.
- Since:
- 1.14
- Author:
- Sören Henning
-
Constructor Summary
Constructors Constructor Description RunningMedian()
RunningMedian(java.util.function.BiFunction<T,T,T> meanBuilder)
-
Method Summary
Modifier and Type Method Description void
add(T element)
static RunningMedian<java.lang.Double>
forDouble()
static RunningMedian<java.lang.Integer>
forInteger()
static RunningMedian<java.lang.Long>
forLong()
T
getMedian()
-
Constructor Details
-
RunningMedian
public RunningMedian() -
RunningMedian
-
-
Method Details