public class Histogram extends Object
Constructor and Description |
---|
Histogram(int bins,
double maxValue)
create a histogram with the specified amount of bins with the min value
set to zero
|
Histogram(int bins,
double minValue,
double maxValue)
Create a histogram with the specified amount of bins with the min value
set to zero
|
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Raise the counter for the specified value by 1.
|
void |
add(double value,
double increase)
Raise the counter vor the value by the amount denoted by increase.
|
double |
getBinWidth() |
double[] |
getHistogramm()
returns a reference(!)
|
double |
getMaxValue() |
double |
getMinValue() |
String |
toString() |
public Histogram(int bins, double maxValue)
bins
- amount of bins (>0)maxValue
- max value (>minValue)public Histogram(int bins, double minValue, double maxValue)
bins
- amount of bins (>0)minValue
- minimum valuemaxValue
- max value (>minValue)IllegalArgumentException
- if bins <= 0 or max <=minpublic void add(double value)
value
- public void add(double value, double increase)
value
- increase
- public double[] getHistogramm()
public double getBinWidth()
public double getMaxValue()
public double getMinValue()
Copyright © 2013. All Rights Reserved.