Class HistogramCalculator
java.lang.Object
io.deephaven.plot.datasets.histogram.HistogramCalculator
Utility for calculating histogram plot information: bin locations and data frequencies within these bins.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tablecalc(Table table, String histogramColumn, double rangeMin, double rangeMax, int nbins, PlotInfo plotInfo, String... byColumns) Splits the specified range intonbinsequally sized bins.static Tablecalc(Table table, String histogramColumn, double rangeMin, double rangeMax, int nbins, PlotInfo plotInfo, List<String> byColumns) Splits the specified range intonbinsequally sized bins.static TableFinds the minimum and maximum of the data in thecolumnof thetableand splits this range intonbinsequally sized bins.static TableFinds the minimum and maximum of the data in thecolumnof thetableand splits this range intonbinsequally sized bins.
-
Constructor Details
-
HistogramCalculator
public HistogramCalculator()
-
-
Method Details
-
calc
public static Table calc(Table table, String column, int nbins, PlotInfo plotInfo, String... byColumns) Finds the minimum and maximum of the data in thecolumnof thetableand splits this range intonbinsequally sized bins. Calculates the number of data values in each bin.Data which is not finite as defined in
Numeric.isFinite(java.lang.Byte)is filtered out of the data set.- Parameters:
table- tablecolumn- column intablenbins- number of binsplotInfo- plot informationbyColumns- other columns needed to calaculate histogram, these columns will be included while grouping- Returns:
- table holding the calculated bins and their counts
- Throws:
RequirementFailure-tableandcolumnmust not be nullRuntimeException-columnmust be numericRequirementFailure-tableandcolumnmust not be nullRuntimeException-columnmust be numeric
-
calc
public static Table calc(Table table, String column, int nbins, PlotInfo plotInfo, List<String> byColumns) Finds the minimum and maximum of the data in thecolumnof thetableand splits this range intonbinsequally sized bins. Calculates the number of data values in each bin.Data which is not finite as defined in
Numeric.isFinite(java.lang.Byte)is filtered out of the data set.- Parameters:
table- tablecolumn- column intablenbins- number of binsplotInfo- plot informationbyColumns- other columns needed to calaculate histogram, these columns will be included while grouping- Returns:
- table holding the calculated bins and their counts
- Throws:
RequirementFailure-tableandcolumnmust not be nullRuntimeException-columnmust be numeric
-
calc
public static Table calc(Table table, String histogramColumn, double rangeMin, double rangeMax, int nbins, PlotInfo plotInfo, String... byColumns) Splits the specified range intonbinsequally sized bins. Calculates the number of data values in each bin.Data which is not finite as defined in
Numeric.isFinite(java.lang.Byte)is filtered out of the data set.- Parameters:
table- tablehistogramColumn- histogramColumn intablerangeMin- range minimumrangeMax- range maximumnbins- number of binsplotInfo- plot informationbyColumns- other columns needed to calaculate histogram, these columns will be included while grouping- Returns:
- table holding the calculated bins and their counts
- Throws:
RequirementFailure-tableandhistogramColumnmust not be nullRuntimeException-histogramColumnmust be numeric
-
calc
public static Table calc(Table table, String histogramColumn, double rangeMin, double rangeMax, int nbins, PlotInfo plotInfo, List<String> byColumns) Splits the specified range intonbinsequally sized bins. Calculates the number of data values in each bin.Data which is not finite as defined in
Numeric.isFinite(java.lang.Byte)is filtered out of the data set.- Parameters:
table- tablehistogramColumn- histogramColumn intablerangeMin- range minimumrangeMax- range maximumnbins- number of binsplotInfo- plot informationbyColumns- other columns needed to calaculate histogram, these columns will be included while grouping- Returns:
- table holding the calculated bins and their counts
- Throws:
RequirementFailure-tableandhistogramColumnmust not be nullRuntimeException-histogramColumnmust be numeric
-