edu.harvard.syrah.pyxida.nc.lib
Class WindowStatistic

java.lang.Object
  extended by edu.harvard.syrah.pyxida.nc.lib.WindowStatistic

public class WindowStatistic
extends java.lang.Object


Field Summary
static boolean debug
           
protected  boolean dirty
           
protected  int max_history
           
protected  double previousPercentile
           
protected  double previousValue
           
protected  java.util.List<edu.harvard.syrah.pyxida.nc.lib.WindowStatistic.Statistic> samples
           
 
Constructor Summary
WindowStatistic(int _max_history)
           
 
Method Summary
 void add(double sample)
           
protected  double calcPercentile(double p)
           
 void clear()
           
 double getMean()
           
 double getPercentile(double p)
           
 int getSize()
           
protected  double getSum()
           
 boolean withinVariance(double pct)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug

max_history

protected final int max_history

samples

protected final java.util.List<edu.harvard.syrah.pyxida.nc.lib.WindowStatistic.Statistic> samples

dirty

protected boolean dirty

previousPercentile

protected double previousPercentile

previousValue

protected double previousValue
Constructor Detail

WindowStatistic

public WindowStatistic(int _max_history)
Method Detail

clear

public void clear()

add

public void add(double sample)

getSize

public int getSize()

withinVariance

public boolean withinVariance(double pct)

getPercentile

public double getPercentile(double p)

calcPercentile

protected double calcPercentile(double p)

getSum

protected double getSum()

getMean

public double getMean()