com.flaptor.hist4j
Class HistogramNode

java.lang.Object
  extended by com.flaptor.hist4j.HistogramNode
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HistogramDataNode, HistogramForkNode

public abstract class HistogramNode
extends java.lang.Object
implements java.io.Serializable

A HistogramNode is the building block for the histogram data structure and provides a common inteface for both the data and the fork nodes. This is an abstract class, and it is instantiated as either a fork node or a data node.

Author:
Jorge Handl
See Also:
Serialized Form

Constructor Summary
HistogramNode()
           
 
Method Summary
abstract  HistogramNode addValue(AdaptiveHistogram root, float value)
          Abstract method for adding a value to the histogram
abstract  void apply(AdaptiveHistogram.ValueConversion valueConversion)
          Abstract method for applying a convertion function to the values stored in the histogram
abstract  long getAccumCount(float value)
          Abstract method for getting the cumulative density function for a given value
abstract  long getCount(float value)
          Abstract method for getting the number of values stored in the same bucket as a reference value
abstract  java.lang.Float getValueForAccumCount(long[] accumCount)
          Abstract method for getting the value for which the cumulative density function reaches the desired value
protected  void margin(int level)
          Prints a margin corresponding to the provided tree level
abstract  void reset()
          Abstract method for clearing the node
abstract  void show(int level)
          Abstract method for showing the data structure
abstract  void toTable(java.util.ArrayList<Cell> table)
          Abstract method for getting a table representing the histogram data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistogramNode

public HistogramNode()
Method Detail

reset

public abstract void reset()
Abstract method for clearing the node


addValue

public abstract HistogramNode addValue(AdaptiveHistogram root,
                                       float value)
Abstract method for adding a value to the histogram


getCount

public abstract long getCount(float value)
Abstract method for getting the number of values stored in the same bucket as a reference value


getAccumCount

public abstract long getAccumCount(float value)
Abstract method for getting the cumulative density function for a given value


getValueForAccumCount

public abstract java.lang.Float getValueForAccumCount(long[] accumCount)
Abstract method for getting the value for which the cumulative density function reaches the desired value


apply

public abstract void apply(AdaptiveHistogram.ValueConversion valueConversion)
Abstract method for applying a convertion function to the values stored in the histogram


toTable

public abstract void toTable(java.util.ArrayList<Cell> table)
Abstract method for getting a table representing the histogram data


show

public abstract void show(int level)
Abstract method for showing the data structure


margin

protected void margin(int level)
Prints a margin corresponding to the provided tree level