Documentation of 'de.erichseifert.gral.data.statistics.Histogram2D' Java class
Histogram2D
de.erichseifert.gral.data.statistics

Class Histogram2D

  • All Implemented Interfaces:
    DataListener, DataSource, java.io.Serializable, java.lang.Iterable<java.lang.Comparable<?>>


    public class Histogram2D
    extends AbstractHistogram2D

    View that aggregates the column values of an other data source into a histogram with cells. The cells size can be equally sized by defining a number of cells or breakpoints between histogram cells can be passed as an array to create unequally sized cells.

    For ease of use the histogram is a data source itself.

    See Also:
    Serialized Form
    • Constructor Detail

      • Histogram2D

        public Histogram2D(DataSource data,
                           Orientation orientation,
                           int breakCount)
        Creates a new AbstractHistogram2D object with the specified DataSource and cell count.
        Parameters:
        data - DataSource so be analyzed.
        orientation - Orientation of the histogram values.
        breakCount - Number of subdivisions for analysis.
      • Histogram2D

        public Histogram2D(DataSource data,
                           Orientation orientation,
                           java.lang.Number[]... breaks)
        Initializes a new histogram with the specified data source and subdivisions at the specified positions.
        Parameters:
        data - Data source to be analyzed.
        orientation - Orientation in which the data should be sampled.
        breaks - Values of where a subdivision should occur.
    • Method Detail

      • getOrientation

        public Orientation getOrientation()
        Returns the direction in which the histogram values will be accumulated.
        Returns:
        Horizontal or vertical orientation.
      • getCellLimits

        public java.lang.Number[] getCellLimits(int col,
                                                int cell)
        Returns the minimum and maximum value of the specified cell.
        Parameters:
        col - Column index.
        cell - Cell index.
        Returns:
        Extent of the cell.
      • get

        public java.lang.Comparable<?> get(int col,
                                           int row)
        Returns the row with the specified index.
        Parameters:
        col - index of the column to return
        row - index of the row to return
        Returns:
        the specified value of the data cell
      • getRowCount

        public int getRowCount()
        Returns the number of rows of the data source.
        Returns:
        number of rows in the data source.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.