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 CorrMatrixBlockcreate(MatrixBlock blkIn)Create an initial sketch of a given block.MatrixBlockgetValue(MatrixBlock blkIn)Get scalar distinct count from an input matrix block.MatrixBlockgetValueFromSketch(CorrMatrixBlock blkIn)Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.CorrMatrixBlockintersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)Intersect two sketchesCorrMatrixBlockunion(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:MatrixSketchGet 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:MatrixSketchObtain 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:MatrixSketchCreate 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:MatrixSketchUnion 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:MatrixSketchIntersect two sketches- Parameters:
arg0- Sketch onearg1- Sketch two- Returns:
- The sketch intersection is a sketch
-
-