org.apache.mahout.math.jet.stat.quantile
Class EquiDepthHistogram

java.lang.Object
  extended by org.apache.mahout.math.PersistentObject
      extended by org.apache.mahout.math.jet.stat.quantile.EquiDepthHistogram
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

Deprecated. until unit tests are in place. Until this time, this class/interface is unsupported.

@Deprecated
public class EquiDepthHistogram
extends PersistentObject

See Also:
Serialized Form

Constructor Summary
EquiDepthHistogram(float[] quantileElements)
          Deprecated. Constructs an equi-depth histogram with the given quantile elements.
 
Method Summary
 int binOfElement(float element)
          Deprecated. Returns the bin index of the given element.
 int bins()
          Deprecated. Returns the number of bins.
 float endOfBin(int binIndex)
          Deprecated. Returns the end of the range associated with the given bin.
 double percentFromTo(float from, float to)
          Deprecated. Returns the percentage of elements in the range (from,to].
 double phi(float element)
          Deprecated. Returns how many percent of the elements contained in the receiver are <= element.
 int size()
          Deprecated. Deprecated. Returns the number of bin boundaries.
 float startOfBin(int binIndex)
          Deprecated. Returns the start of the range associated with the given bin.
 
Methods inherited from class org.apache.mahout.math.PersistentObject
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EquiDepthHistogram

public EquiDepthHistogram(float[] quantileElements)
Deprecated. 
Constructs an equi-depth histogram with the given quantile elements. Quantile elements must be sorted ascending and have the form specified in the class documentation.

Method Detail

binOfElement

public int binOfElement(float element)
Deprecated. 
Returns the bin index of the given element. In other words, returns a handle to the range the element falls into.

Parameters:
element - the element to search for.
Throws:
java.lang.IllegalArgumentException - if the element is not contained in any bin.

bins

public int bins()
Deprecated. 
Returns the number of bins. In other words, returns the number of subdomains partitioning the entire value domain.


endOfBin

public float endOfBin(int binIndex)
Deprecated. 
Returns the end of the range associated with the given bin.

Throws:
java.lang.ArrayIndexOutOfBoundsException - if binIndex < 0 || binIndex >= bins().

percentFromTo

public double percentFromTo(float from,
                            float to)
Deprecated. 
Returns the percentage of elements in the range (from,to]. Does linear interpolation.

Parameters:
from - the start point (exclusive).
to - the end point (inclusive).

phi

public double phi(float element)
Deprecated. 
Returns how many percent of the elements contained in the receiver are <= element. Does linear interpolation.

Parameters:
element - the element to search for.

size

@Deprecated
public int size()
Deprecated. Deprecated. Returns the number of bin boundaries.


startOfBin

public float startOfBin(int binIndex)
Deprecated. 
Returns the start of the range associated with the given bin.

Throws:
java.lang.ArrayIndexOutOfBoundsException - if binIndex < 0 || binIndex >= bins().


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.