Interface LibMatrixCountDistinct
-
public interface LibMatrixCountDistinctThis class contains various methods for counting the number of distinct values inside a MatrixBlock
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.logging.LogLOGstatic intminimumSizeThe minimum number NonZero of cells in the input before using approximate techniques for counting number of distinct values.
-
Method Summary
Static Methods Modifier and Type Method Description static MatrixBlockcountDistinctValuesFromSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn)static CorrMatrixBlockcreateSketch(CountDistinctOperator op, MatrixBlock blkIn)static MatrixBlockestimateDistinctValues(MatrixBlock in, CountDistinctOperator op)Public method to count the number of distinct values inside a matrix.static CorrMatrixBlockunionSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn0, CorrMatrixBlock corrBlkIn1)
-
-
-
Field Detail
-
LOG
static final org.apache.commons.logging.Log LOG
-
minimumSize
static final int minimumSize
The minimum number NonZero of cells in the input before using approximate techniques for counting number of distinct values.- See Also:
- Constant Field Values
-
-
Method Detail
-
estimateDistinctValues
static MatrixBlock estimateDistinctValues(MatrixBlock in, CountDistinctOperator op)
Public method to count the number of distinct values inside a matrix. Depending on which CountDistinctOperator selected it either gets the absolute number or a estimated value. TODO: If the MatrixBlock type is CompressedMatrix, simply read the values from the ColGroups.- Parameters:
in- the input matrix to count number distinct values inop- the selected operator to use- Returns:
- A matrix block containing the absolute distinct count for the entire input or along given row/col axis
-
countDistinctValuesFromSketch
static MatrixBlock countDistinctValuesFromSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn)
-
createSketch
static CorrMatrixBlock createSketch(CountDistinctOperator op, MatrixBlock blkIn)
-
unionSketch
static CorrMatrixBlock unionSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn0, CorrMatrixBlock corrBlkIn1)
-
-