Documentation of 'jminhep.utils.VEC' Java class
VEC
jminhep.utils

Class VEC



  • public class VEC
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      VEC() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getMatrix(int n1, int n2, double[][] m, int d, int w)
      Method for filling string with a matrix
      Based on ER Harold, "Java I/O", O'Reilly, around p.
      static java.lang.String getSpaces(int n) 
      static double[][] GetSummaryData(int nrow, int ncol, double[][] A) 
      static void inSort(double[] invect)
      Method to sort a double vector, by inefficient straight insertion See section 8.1, p.
      static void printMatrix(int n1, int n2, double[][] m, int d, int w)
      Method for printing a matrix
      Based on ER Harold, "Java I/O", O'Reilly, around p.
      static void printMatrix(int n1, int n2, int[][] m, int d, int w)
      Method for printing an integer matrix
      Based on ER Harold, "Java I/O", O'Reilly, around p.
      static void printVect(double[] m, int d, int w)
      Method printVect for printing a vector
      Based on ER Harold, "Java I/O", O'Reilly, around p.
      static void printVect(int[] m, int d, int w)
      Method printVect for printing a vector
      Based on ER Harold, "Java I/O", O'Reilly, around p.
      static double[][] Standardize(int nrow, int ncol, double[][] A)
      Method for standardizing the input data
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VEC

        public VEC()
    • Method Detail

      • getSpaces

        public static java.lang.String getSpaces(int n)
      • printMatrix

        public static void printMatrix(int n1,
                                       int n2,
                                       double[][] m,
                                       int d,
                                       int w)
        Method for printing a matrix
        Based on ER Harold, "Java I/O", O'Reilly, around p. 473.
        Parameters:
        n1 - row dimension of matrix
        n2 - column dimension of matrix
        m - input matrix values
        d - display precision, number of decimal places
        w - display precision, total width of floating value
      • getMatrix

        public static java.lang.String getMatrix(int n1,
                                                 int n2,
                                                 double[][] m,
                                                 int d,
                                                 int w)
        Method for filling string with a matrix
        Based on ER Harold, "Java I/O", O'Reilly, around p. 473.
        Parameters:
        n1 - row dimension of matrix
        n2 - column dimension of matrix
        m - input matrix values
        d - display precision, number of decimal places
        w - display precision, total width of floating value
      • printMatrix

        public static void printMatrix(int n1,
                                       int n2,
                                       int[][] m,
                                       int d,
                                       int w)
        Method for printing an integer matrix
        Based on ER Harold, "Java I/O", O'Reilly, around p. 473.
        Parameters:
        n1 - row dimension of matrix
        n2 - column dimension of matrix
        m - input matrix values
        d - display precision, number of decimal places
        w - display precision, total width of floating value
      • printVect

        public static void printVect(double[] m,
                                     int d,
                                     int w)
        Method printVect for printing a vector
        Based on ER Harold, "Java I/O", O'Reilly, around p. 473.
        Parameters:
        m - input vector of length m.length
        d - display precision, number of decimal places
        w - display precision, total width of floating value
      • printVect

        public static void printVect(int[] m,
                                     int d,
                                     int w)
        Method printVect for printing a vector
        Based on ER Harold, "Java I/O", O'Reilly, around p. 473.
        Parameters:
        m - input vector of length m.length
        d - display precision, number of decimal places
        w - display precision, total width of floating value
      • Standardize

        public static double[][] Standardize(int nrow,
                                             int ncol,
                                             double[][] A)
        Method for standardizing the input data

        Note the formalas used (since these vary between implementations):
        reduction: (vect - meanvect)/sqrt(nrow)*colstdev
        colstdev: sum_cols ((vect - meanvect)^2/nrow)
        if colstdev is close to 0, then set it to 1.

        Parameters:
        nrow - number of rows in input matrix
        ncol - number of columns in input matrix
        A - input matrix values
      • GetSummaryData

        public static double[][] GetSummaryData(int nrow,
                                                int ncol,
                                                double[][] A)
      • inSort

        public static void inSort(double[] invect)
        Method to sort a double vector, by inefficient straight insertion See section 8.1, p. 243, of Numerical Recipes in C. Two corrections, FM, 2003/11/14
        Parameters:
        invect - input data to be sorted, sorted in place

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.