Class Histogram


  • public class Histogram
    extends java.lang.Object
    Histogram

    Copyright: Actelion Ltd., Inc. All Rights Reserved This software is the proprietary information of Actelion Pharmaceuticals, Ltd. Use is subject to license terms.

    Version:
    1.0 29 Feb 2008 MvK: Start implementation 06 Jun 2016 MvK: added cumulative histogram to output. 03.12.2018 improvements toString()
    Author:
    Modest von Korff
    • Constructor Detail

      • Histogram

        public Histogram​(double[] arrRaw,
                         double min,
                         double max,
                         int bins)
      • Histogram

        public Histogram​(double[] arrRaw,
                         int bins)
    • Method Detail

      • initialize

        public void initialize​(double[] arrRaw,
                               double min,
                               double max,
                               int bins)
      • getBinIndex

        public int getBinIndex​(double v)
      • getFrequencies

        public int[] getFrequencies()
      • getFrequency

        public int getFrequency​(int index)
      • getBins

        public float[] getBins()
      • getBin

        public float getBin​(int index)
      • getNumBins

        public int getNumBins()
      • getMaximumY

        public double getMaximumY()
      • getSumY

        public double getSumY()
      • getSumFromRange

        public double getSumFromRange​(double low,
                                      double up)
        Parts of the range outside the bins are not considered.
        Parameters:
        low -
        up -
        Returns:
      • getHistogram

        public Matrix getHistogram()
      • getMinimumX

        public double getMinimumX()
      • getMaximumX

        public double getMaximumX()
      • toString

        public java.lang.String toString()
        First row: bins, upper border. Sec row: frequencies Third: row cumulative fraction
        Overrides:
        toString in class java.lang.Object
      • getBinWidth

        public double getBinWidth()
      • main

        public static void main​(java.lang.String[] args)