desc
Class histStat

public class histStat
extends histNorm
Method Detail

initDataLoop

boolean initDataLoop(int nn,
                     int[] data,
                     float[] xxdata)
Compare with initDataLoop in hist(), it adds calculating summation and the sum of the squares

hist_MouseReleased

public void hist_MouseReleased(MouseEvent event)
Compare with hist_MouseReleased in hist(), it adds calculating summation and the sum of the squares, and call computeStats() to recalculate all the statistics

setData

public void setData(int[] data,
                    int nn,
                    boolean add,
                    double _sum,
                    double _ssq)
Compare with setData(int[] data, int nn, boolean add) in hist(), it adds calculating summation and the sum of the squares, and call computeStats() to recalculate all the statistics

paint

public void paint(Graphics g)
This paint will plot the statistics of the data on the histogram's upper left corner if showStat is set to be true

setFreq

public void setFreq(int[] _f)
Compare with setFreq(int[] f) in hist(), it adds calculating summation and the sum of the squares, then call setData(_f,_f.length,false,sum,ssq);

computeStats

public void computeStats()
Computes eight statistics, 0:mean,1:median,2:sd,3:range,4:skewness,5:Mad,7:kurtosis,8:mode

plotStats

public void plotStats(Graphics g)
Computes the proper positions to draw statistics, by calling procedure printStat

printStat

public void printStat(double stat,
                      boolean drawLine,
                      float xstep,
                      float pixstep,
                      int L,
                      int in,
                      int Y1,
                      int Y2,
                      String tstring,
                      Graphics g,
                      FontMetrics met)
draw the stat string information on the upper left corner, and also draw color lines on the histogram to identify these statistics' positions if drawline is set to true