Class CountDistinctFunctionSketch
- java.lang.Object
-
- org.apache.sysds.runtime.matrix.data.sketch.CountDistinctSketch
-
- org.apache.sysds.runtime.matrix.data.sketch.countdistinct.CountDistinctFunctionSketch
-
- All Implemented Interfaces:
MatrixSketch
public class CountDistinctFunctionSketch extends CountDistinctSketch
-
-
Field Summary
-
Fields inherited from class org.apache.sysds.runtime.matrix.data.sketch.CountDistinctSketch
op
-
-
Constructor Summary
Constructors Constructor Description CountDistinctFunctionSketch(Operator op)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorrMatrixBlock
create(MatrixBlock blkIn)
Create an initial sketch of a given block.MatrixBlock
getValue(MatrixBlock blkIn)
Get scalar distinct count from an input matrix block.MatrixBlock
getValueFromSketch(CorrMatrixBlock blkIn)
Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.CorrMatrixBlock
intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Intersect two sketchesCorrMatrixBlock
union(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Union two sketches together to from a combined sketch.
-
-
-
Constructor Detail
-
CountDistinctFunctionSketch
public CountDistinctFunctionSketch(Operator op)
-
-
Method Detail
-
getValue
public MatrixBlock getValue(MatrixBlock blkIn)
Description copied from interface:MatrixSketch
Get scalar distinct count from an input matrix block.- Parameters:
blkIn
- An input block to estimate the number of distinct values in- Returns:
- The result matrix block containing the distinct count estimate
-
getValueFromSketch
public MatrixBlock getValueFromSketch(CorrMatrixBlock blkIn)
Description copied from interface:MatrixSketch
Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.- Parameters:
blkIn
- The sketch block to extract the count from- Returns:
- The result matrix block
-
create
public CorrMatrixBlock create(MatrixBlock blkIn)
Description copied from interface:MatrixSketch
Create an initial sketch of a given block.- Parameters:
blkIn
- A block to process- Returns:
- A sketch
-
union
public CorrMatrixBlock union(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Description copied from interface:MatrixSketch
Union two sketches together to from a combined sketch.- Parameters:
arg0
- Sketch onearg1
- Sketch two- Returns:
- The sketch union is a sketch
-
intersection
public CorrMatrixBlock intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Description copied from interface:MatrixSketch
Intersect two sketches- Parameters:
arg0
- Sketch onearg1
- Sketch two- Returns:
- The sketch intersection is a sketch
-
-