类 Stats


  • public class Stats
    extends java.lang.Object
    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
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static java.lang.String ANTLRWORKS_DIR  
    • 构造器概要

      构造器 
      构造器 说明
      Stats()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static double avg​(int[] X)
      Compute the sample mean
      static double avg​(java.util.List<java.lang.Integer> X)
      Compute the sample mean
      static java.lang.String getAbsoluteFileName​(java.lang.String filename)  
      static int max​(int[] X)  
      static int max​(java.util.List<java.lang.Integer> X)  
      static int min​(int[] X)  
      static int min​(java.util.List<java.lang.Integer> X)  
      static double stddev​(int[] X)
      Compute the sample (unbiased estimator) standard deviation following: Computing Deviations: Standard Accuracy Tony F.
      static int sum​(int[] X)  
      static void writeReport​(java.lang.String filename, java.lang.String data)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • ANTLRWORKS_DIR

        public static final java.lang.String ANTLRWORKS_DIR
        另请参阅:
        常量字段值
    • 构造器详细资料

      • Stats

        public Stats()
    • 方法详细资料

      • stddev

        public static double stddev​(int[] X)
        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.
      • avg

        public static double avg​(int[] X)
        Compute the sample mean
      • min

        public static int min​(int[] X)
      • max

        public static int max​(int[] X)
      • avg

        public static double avg​(java.util.List<java.lang.Integer> X)
        Compute the sample mean
      • min

        public static int min​(java.util.List<java.lang.Integer> X)
      • max

        public static int max​(java.util.List<java.lang.Integer> X)
      • sum

        public static int sum​(int[] X)
      • writeReport

        public static void writeReport​(java.lang.String filename,
                                       java.lang.String data)
                                throws java.io.IOException
        抛出:
        java.io.IOException
      • getAbsoluteFileName

        public static java.lang.String getAbsoluteFileName​(java.lang.String filename)