public interface Histogram extends Copyable<Histogram>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Histogram.Normalization
Type of Histogram Normalization
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addData(double value)
Add one occurrence of value
|
void |
addData(double[] values)
Add one occurrence of each value
|
void |
addData(double[] values,
double[] weights) |
boolean |
addData(double value,
double weight)
Add value contributing with weight
|
boolean |
addData(double value,
double weight,
com.google.common.base.Predicate<Double> predicate)
Add the data into this histogram if the given predicate is true
|
boolean |
addDataAtBin(double weight,
int index)
Add data at given bin
|
void |
clear()
Empty data
|
double |
getAbsoluteBinFreq(int index)
Get the absolute frequency at given bin
|
double[] |
getAbsoluteBinFreqs(double[] dest) |
int |
getBinIndex(double value)
Get the bin index containing the given value (else must return -1)
|
double |
getBinWidth()
Get the bin width
|
double[] |
getBreaks(double[] dest)
Get the n+1 cells boundaries
|
double |
getCumulFreqs()
Get the counts of the cumulative number of observations in all bins
|
double |
getCumulFreqs(int fromIncluded,
int toExcluded)
Get the counts of the cumulative number of weighed observations in all of the bins in the specifed range
|
double[] |
getMids(double[] dest)
Get the n cell midpoints
|
int |
getMostIntenseBinIndex()
Get the most intense bin index
|
String |
getName()
Get its name
|
Set<Integer> |
getNonEmptyBinIndices()
Get the set of non-empty bins
|
com.google.common.collect.Range<Double> |
getRange()
Get the range of defined values (first to last bin)
|
double |
getRelativeBinFreq(int index)
Get the relative (normalized by the cumulative weights) weighted frequencies at given bin
|
double |
getRelativeBinFreq(int fromIncluded,
int toExcluded)
Get the relative (normalized by the cumulative weights) weighted frequencies between bins
|
boolean |
isEmpty()
Return true if no data
|
Histogram |
normalize(Histogram.Normalization normalization)
Normalize histogram (weighted) frequencies
|
Histogram |
shallowCopy()
Copy the bin structure only
|
int |
size()
Get the number of bins (n)
|
String getName()
Histogram shallowCopy()
void clear()
boolean isEmpty()
com.google.common.collect.Range<Double> getRange()
int size()
double getBinWidth()
boolean addData(double value,
double weight,
com.google.common.base.Predicate<Double> predicate)
boolean addData(double value,
double weight)
boolean addData(double value)
void addData(double[] values)
void addData(double[] values,
double[] weights)
boolean addDataAtBin(double weight,
int index)
int getBinIndex(double value)
int getMostIntenseBinIndex()
double getAbsoluteBinFreq(int index)
double[] getAbsoluteBinFreqs(double[] dest)
double getRelativeBinFreq(int index)
double getRelativeBinFreq(int fromIncluded,
int toExcluded)
double getCumulFreqs()
double getCumulFreqs(int fromIncluded,
int toExcluded)
double[] getBreaks(double[] dest)
double[] getMids(double[] dest)
Histogram normalize(Histogram.Normalization normalization)
Copyright © 2016. All Rights Reserved.