|
Parallel Colt 0.7.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcern.colt.PersistentObject
cern.jet.stat.tdouble.quantile.DoubleEquiDepthHistogram
public class DoubleEquiDepthHistogram
Read-only equi-depth histogram for selectivity estimation. Assume you have collected statistics over a data set, among them a one-dimensional equi-depth histogram (quantiles). Then an applications or DBMS might want to estimate the selectivity of some range query [from,to], i.e. the percentage of data set elements contained in the query range. This class does not collect equi-depth histograms but only space efficiently stores already produced histograms and provides operations for selectivity estimation. Uses linear interpolation.
This class stores a list l of double values for which holds:
| Field Summary |
|---|
| Fields inherited from class cern.colt.PersistentObject |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
DoubleEquiDepthHistogram(double[] quantileElements)
Constructs an equi-depth histogram with the given quantile elements. |
|
| Method Summary | |
|---|---|
int |
binOfElement(double element)
Returns the bin index of the given element. |
int |
bins()
Returns the number of bins. |
double |
endOfBin(int binIndex)
Returns the end of the range associated with the given bin. |
double |
percentFromTo(double from,
double to)
Returns the percentage of elements in the range (from,to]. |
double |
phi(double element)
Returns how many percent of the elements contained in the receiver are <= element. |
int |
size()
Deprecated. Deprecated. Returns the number of bin boundaries. |
double |
startOfBin(int binIndex)
Returns the start of the range associated with the given bin. |
static void |
test(double element)
Not yet commented. |
| Methods inherited from class cern.colt.PersistentObject |
|---|
clone |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DoubleEquiDepthHistogram(double[] quantileElements)
| Method Detail |
|---|
public int binOfElement(double element)
element - the element to search for.
IllegalArgumentException - if the element is not contained in any bin.public int bins()
public double endOfBin(int binIndex)
ArrayIndexOutOfBoundsException - if binIndex < 0 || binIndex >= bins().
public double percentFromTo(double from,
double to)
from - the start point (exclusive).to - the end point (inclusive).
public double phi(double element)
element - the element to search for.
public int size()
public double startOfBin(int binIndex)
ArrayIndexOutOfBoundsException - if binIndex < 0 || binIndex >= bins().public static void test(double element)
|
Parallel Colt 0.7.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||