Class NumericBinIndex

java.lang.Object
com.google.refine.browsing.util.NumericBinIndex
Direct Known Subclasses:
NumericBinRecordIndex, NumericBinRowIndex

public abstract class NumericBinIndex extends Object
A utility class for computing the base bins that form the base histograms of numeric range facets. It evaluates an expression on all the rows of a project to get numeric values, determines how many bins to distribute those values in, and bins the rows accordingly. This class processes all rows rather than just the filtered rows because it needs to compute the base bins of a numeric range facet, which remain unchanged as the user interacts with the facet.
  • Field Details

    • _totalValueCount

      protected int _totalValueCount
    • _numbericValueCount

      protected int _numbericValueCount
    • _min

      protected double _min
    • _max

      protected double _max
    • _step

      protected double _step
    • _bins

      protected int[] _bins
    • _numericRowCount

      protected int _numericRowCount
    • _nonNumericRowCount

      protected int _nonNumericRowCount
    • _blankRowCount

      protected int _blankRowCount
    • _errorRowCount

      protected int _errorRowCount
    • _hasError

      protected boolean _hasError
    • _hasNonNumeric

      protected boolean _hasNonNumeric
    • _hasNumeric

      protected boolean _hasNumeric
    • _hasBlank

      protected boolean _hasBlank
  • Constructor Details

  • Method Details

    • iterate

      protected abstract void iterate(Project project, RowEvaluable rowEvaluable, List<Double> allValues)
    • isNumeric

      public boolean isNumeric()
    • getMin

      public double getMin()
    • getMax

      public double getMax()
    • getStep

      public double getStep()
    • getBins

      public int[] getBins()
    • getNumericRowCount

      public int getNumericRowCount()
    • getNonNumericRowCount

      public int getNonNumericRowCount()
    • getBlankRowCount

      public int getBlankRowCount()
    • getErrorRowCount

      public int getErrorRowCount()
    • processRow

      protected void processRow(Project project, RowEvaluable rowEvaluable, List<Double> allValues, int rowIndex, Row row, Properties bindings)
    • preprocessing

      protected void preprocessing()
    • postprocessing

      protected void postprocessing()
    • processValue

      protected boolean processValue(double v, List<Double> allValues)