org.apache.jorphan.math
public abstract class StatCalculator<T extends Number & Comparable<? super T>> extends Object
Constructor and Description |
---|
StatCalculator(T zero,
T min,
T max)
This constructor is used to set up particular values for the generic class instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(StatCalculator<T> calc) |
void |
addBytes(long newValue) |
void |
addValue(T val) |
void |
addValue(T val,
int sampleCount) |
void |
clear() |
protected abstract T |
divide(T val,
int n) |
long |
getCount() |
Map<Number,Number[]> |
getDistribution()
Returns the distribution of the values in the list.
|
T |
getMax() |
double |
getMean() |
T |
getMedian() |
T |
getMin() |
T |
getPercentPoint(double percent)
Get the value which %percent% of the values are less than.
|
T |
getPercentPoint(float percent)
Get the value which %percent% of the values are less than.
|
double |
getStandardDeviation() |
long |
getTotalBytes() |
public StatCalculator(T zero, T min, T max)
zero
- - value to return for Median and PercentPoint if there are no valuesmin
- - value to return for minimum if there are no valuesmax
- - value to return for maximum if there are no valuespublic void clear()
public void addBytes(long newValue)
public void addAll(StatCalculator<T> calc)
public T getMedian()
public long getTotalBytes()
public T getPercentPoint(float percent)
percent
- public T getPercentPoint(double percent)
percent
- public Map<Number,Number[]> getDistribution()
public double getMean()
public double getStandardDeviation()
public T getMin()
public T getMax()
public long getCount()
public void addValue(T val, int sampleCount)
public void addValue(T val)
Copyright © 1998-2014 Apache Software Foundation. All Rights Reserved.