Class MatrixBasedHistogram
- java.lang.Object
-
- com.actelion.research.calc.histogram.MatrixBasedHistogram
-
public class MatrixBasedHistogram extends java.lang.ObjectMatrixBasedHistogramModest v. Korff
Created by korffmo1 on 21.12.18.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanVERBOSE
-
Constructor Summary
Constructors Constructor Description MatrixBasedHistogram()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]getBordersMostFreqOccBin(Matrix maHistogram, int radius)Gets the upper and lower limit of the most occupied bin.static HistogramgetFromQuadraticMatrix(Matrix ma, double min, double max, int bins)static MatrixgetHistogram(double[] arrValues, Matrix maHistogramBins)static MatrixgetHistogram(float[][] ma, int col, Matrix maHistogramBins)static MatrixgetHistogram(float[] ma, Matrix maHistogramBins)static MatrixgetHistogram(Matrix maHistogramBins)static MatrixgetHistogram(Matrix ma, int numBins)static MatrixgetHistogram(Matrix ma, Matrix maHistogramBins)static MatrixgetHistogramBins(double dMin, double dMax, int iNumBins)static doublegetMaxOccBin(Matrix maHist)static doublegetMinOccBin(Matrix maHist)static java.lang.Stringhistogram2String(Matrix hist, int digits, int totalWidth)static voidwriteHistogram(java.lang.String sFile, Matrix hist, boolean bApppend, int digits, int totalWidth)
-
-
-
Method Detail
-
getFromQuadraticMatrix
public static Histogram getFromQuadraticMatrix(Matrix ma, double min, double max, int bins)
-
getHistogram
public static Matrix getHistogram(Matrix ma, Matrix maHistogramBins)
- Parameters:
ma- matrix values are written into the histogrammaHistogramBins- matrix with two rows row 1: lower bins; row 2: upper bins.- Returns:
- matrix with 3 rows. Row 0 lower bins, row 1: upper bins, row 2 frequency.
-
getBordersMostFreqOccBin
public static double[] getBordersMostFreqOccBin(Matrix maHistogram, int radius)
Gets the upper and lower limit of the most occupied bin.- Parameters:
maHistogram-radius- so many bins are taken from the left and the right.- Returns:
- arr[0]: lower limit, arr[1]: upper limit
-
getMinOccBin
public static double getMinOccBin(Matrix maHist)
- Parameters:
maHist- histogram- Returns:
- the lower limit of the first occupied bin in the histogram.
-
getMaxOccBin
public static double getMaxOccBin(Matrix maHist)
- Parameters:
maHist- histogram- Returns:
- the higher limit of the last occupied bin in the histogram.
-
getHistogramBins
public static Matrix getHistogramBins(double dMin, double dMax, int iNumBins)
- Parameters:
dMin- smallest value to put into the histogramdMax- maximum value to be considered.iNumBins- number of bins, between min and max.- Returns:
- matrix with two rows, the lower and upper bins. The last bin is a little bit bigger than the other bins. So the highest value fits into it.
-
writeHistogram
public static void writeHistogram(java.lang.String sFile, Matrix hist, boolean bApppend, int digits, int totalWidth) throws java.io.IOException- Throws:
java.io.IOException
-
histogram2String
public static java.lang.String histogram2String(Matrix hist, int digits, int totalWidth)
- Parameters:
hist-digits-totalWidth- for one number.- Returns:
-
-