org.antlr.runtime.misc.Stats Class Reference

List of all members.

Static Public Member Functions

static double stddev (int[] X)
static double avg (int[] X)
static int min (int[] X)
static int max (int[] X)
static double avg (List< Integer > X)
static int min (List< Integer > X)
static int max (List< Integer > X)
static int sum (int[] X)
static void writeReport (String filename, String data) throws IOException
static String getAbsoluteFileName (String filename)

Static Public Attributes

static final String ANTLRWORKS_DIR = "antlrworks"


Detailed Description

Stats routines needed by profiler etc...

note that these routines return 0.0 if no values exist in the X[] which is not "correct", but it is useful so I don't generate NaN in my output

Definition at line 40 of file Stats.java.


Member Function Documentation

static double org.antlr.runtime.misc.Stats.stddev ( int[]  X  )  [static]

Compute the sample (unbiased estimator) standard deviation following:

Computing Deviations: Standard Accuracy Tony F. Chan and John Gregg Lewis Stanford University Communications of ACM September 1979 of Volume 22 the ACM Number 9

The "two-pass" method from the paper; supposed to have better numerical properties than the textbook summation/sqrt. To me this looks like the textbook method, but I ain't no numerical methods guy.

Definition at line 55 of file Stats.java.

static double org.antlr.runtime.misc.Stats.avg ( int[]  X  )  [static]

Compute the sample mean

Definition at line 70 of file Stats.java.

static int org.antlr.runtime.misc.Stats.min ( int[]  X  )  [static]

Definition at line 85 of file Stats.java.

static int org.antlr.runtime.misc.Stats.max ( int[]  X  )  [static]

Definition at line 99 of file Stats.java.

static double org.antlr.runtime.misc.Stats.avg ( List< Integer >  X  )  [static]

Compute the sample mean

Definition at line 114 of file Stats.java.

static int org.antlr.runtime.misc.Stats.min ( List< Integer >  X  )  [static]

Definition at line 129 of file Stats.java.

static int org.antlr.runtime.misc.Stats.max ( List< Integer >  X  )  [static]

Definition at line 143 of file Stats.java.

static int org.antlr.runtime.misc.Stats.sum ( int[]  X  )  [static]

Definition at line 157 of file Stats.java.

static void org.antlr.runtime.misc.Stats.writeReport ( String  filename,
String  data 
) throws IOException [static]

Definition at line 169 of file Stats.java.

static String org.antlr.runtime.misc.Stats.getAbsoluteFileName ( String  filename  )  [static]

Definition at line 184 of file Stats.java.


Member Data Documentation

final String org.antlr.runtime.misc.Stats.ANTLRWORKS_DIR = "antlrworks" [static]

Definition at line 41 of file Stats.java.


The documentation for this class was generated from the following file:

Generated on Tue Jul 19 11:42:08 2011 for ANTLR API by  doxygen 1.5.5