jminhep.utils
Class VEC
- java.lang.Object
-
- jminhep.utils.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.StringgetMatrix(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.StringgetSpaces(int n)static double[][]GetSummaryData(int nrow, int ncol, double[][] A)static voidinSort(double[] invect)Method to sort a double vector, by inefficient straight insertion See section 8.1, p.static voidprintMatrix(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 voidprintMatrix(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 voidprintVect(double[] m, int d, int w)Method printVect for printing a vector
Based on ER Harold, "Java I/O", O'Reilly, around p.static voidprintVect(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
-
-
-
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 matrixn2- column dimension of matrixm- input matrix valuesd- display precision, number of decimal placesw- 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 matrixn2- column dimension of matrixm- input matrix valuesd- display precision, number of decimal placesw- 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 matrixn2- column dimension of matrixm- input matrix valuesd- display precision, number of decimal placesw- 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.lengthd- display precision, number of decimal placesw- 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.lengthd- display precision, number of decimal placesw- display precision, total width of floating value
-
Standardize
public static double[][] Standardize(int nrow, int ncol, double[][] A)Method for standardizing the input dataNote 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 matrixncol- number of columns in input matrixA- 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