Interface LibMatrixCountDistinct
public interface LibMatrixCountDistinct
This class contains various methods for counting the number of distinct values inside a MatrixBlock
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.commons.logging.Logstatic final intThe minimum number NonZero of cells in the input before using approximate techniques for counting number of distinct values. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic MatrixBlockcountDistinctValuesFromSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn) static CorrMatrixBlockcreateSketch(CountDistinctOperator op, MatrixBlock blkIn) static MatrixBlockPublic method to count the number of distinct values inside a matrix.static CorrMatrixBlockunionSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn0, CorrMatrixBlock corrBlkIn1)
-
Field Details
-
LOG
static final org.apache.commons.logging.Log LOG -
minimumSize
static final int minimumSizeThe minimum number NonZero of cells in the input before using approximate techniques for counting number of distinct values.- See Also:
-
-
Method Details
-
estimateDistinctValues
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
-
unionSketch
static CorrMatrixBlock unionSketch(CountDistinctOperator op, CorrMatrixBlock corrBlkIn0, CorrMatrixBlock corrBlkIn1)
-