public class Histogram extends java.lang.Object
Constructor and Description |
---|
Histogram(double minValue,
double maxValue,
int nbBin,
boolean integer)
Create a histogram for the specified value range and the desired number of bins.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double value)
Add the value to the histogram
|
void |
addValues(byte[] array,
boolean signed)
Add the specified byte array to the histogram
|
void |
addValues(double[] array)
Add the specified double array to the histogram
|
void |
addValues(float[] array)
Add the specified float array to the histogram
|
void |
addValues(int[] array,
boolean signed)
Add the specified int array to the histogram
|
void |
addValues(long[] array,
boolean signed)
Add the specified long array to the histogram
|
void |
addValues(java.lang.Object array,
boolean signed)
Add the specified array of values to the histogram
|
void |
addValues(short[] array,
boolean signed)
Add the specified short array to the histogram
|
int |
getBinNumber()
Returns the number of bins of the histogram.
|
int[] |
getBins()
Returns bins of histogram
|
int |
getBinSize(int index)
Returns the size of the specified bin (number of element in the bin)
|
double |
getBinWidth()
Return the width of a bin
|
double |
getMaxValue()
Returns the maximum allowed value of the histogram.
|
double |
getMinValue()
Returns the minimum allowed value of the histogram.
|
boolean |
isIntegerType()
Returns true if the input value are integer values only.
|
void |
reset()
Reset histogram
|
public Histogram(double minValue, double maxValue, int nbBin, boolean integer)
minValue
- minimum valuemaxValue
- maximum valuenbBin
- number of desired bins (should be > 0).integer
- If true the input value are considered as integer values.public void reset()
public void addValue(double value)
public void addValues(java.lang.Object array, boolean signed)
signed
- false if the input array should be interpreted as unsigned valuespublic void addValues(byte[] array, boolean signed)
public void addValues(short[] array, boolean signed)
public void addValues(int[] array, boolean signed)
public void addValues(long[] array, boolean signed)
public void addValues(float[] array)
public void addValues(double[] array)
public double getMinValue()
public double getMaxValue()
public boolean isIntegerType()
public int getBinNumber()
public double getBinWidth()
public int getBinSize(int index)
public int[] getBins()