Package mgui.stats

Class Histogram

java.lang.Object
mgui.stats.Histogram

public class Histogram
extends java.lang.Object
Histogram representation of a dataset.
Since:
1.0
Version:
1.0
Author:
typically
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    class  Histogram.Bin  
  • Field Summary

    Fields
    Modifier and Type Field Description
    double bin_size  
    java.util.ArrayList<Histogram.Bin> bins  
    double dataMax  
    double dataMin  
    double dataN  
    float ignore_large_bin  
    double maxX  
    double maxY  
    double minX  
    double minY  
  • Constructor Summary

    Constructors
    Constructor Description
    Histogram()  
    Histogram​(java.util.ArrayList<MguiNumber> d, int bins, double min, double max)  
    Histogram​(java.util.ArrayList<MguiNumber> x, java.util.ArrayList<MguiNumber> y, double dataMax, double dataMin)  
  • Method Summary

    Modifier and Type Method Description
    void addValue​(double val)  
    double getNormalized​(double x)  
    double getPercentileValue​(double pct)
    Returns the value corresponding to the specified percentile
    void set​(int bins, double min, double max)  
    void set​(java.util.ArrayList<MguiNumber> d, int bins, double min, double max)  
    void setLimits()  
    boolean setValues​(java.util.ArrayList<MguiNumber> x, java.util.ArrayList<MguiNumber> y)  
    void toFile​(java.io.File file)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • bins

      public java.util.ArrayList<Histogram.Bin> bins
    • dataMax

      public double dataMax
    • dataMin

      public double dataMin
    • dataN

      public double dataN
    • maxY

      public double maxY
    • maxX

      public double maxX
    • minY

      public double minY
    • minX

      public double minX
    • bin_size

      public double bin_size
    • ignore_large_bin

      public float ignore_large_bin
  • Constructor Details

    • Histogram

      public Histogram()
    • Histogram

      public Histogram​(java.util.ArrayList<MguiNumber> x, java.util.ArrayList<MguiNumber> y, double dataMax, double dataMin)
    • Histogram

      public Histogram​(java.util.ArrayList<MguiNumber> d, int bins, double min, double max)
  • Method Details

    • getNormalized

      public double getNormalized​(double x)
    • setLimits

      public void setLimits()
    • getPercentileValue

      public double getPercentileValue​(double pct)
      Returns the value corresponding to the specified percentile
      Parameters:
      pct - Value from 0 to 100
      Returns:
    • toFile

      public void toFile​(java.io.File file)
    • setValues

      public boolean setValues​(java.util.ArrayList<MguiNumber> x, java.util.ArrayList<MguiNumber> y)
    • set

      public void set​(int bins, double min, double max)
    • addValue

      public void addValue​(double val)
    • set

      public void set​(java.util.ArrayList<MguiNumber> d, int bins, double min, double max)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object