Class KMVSketch
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.sketch.countdistinctapprox.KMVSketch
 
- 
- All Implemented Interfaces:
- MatrixSketch<Integer>
 
 public class KMVSketch extends Object KMV synopsis(for k minimum values) Distinct-Value Estimation Kevin S. Beyer, Peter J. Haas, Berthold Reinwald, Yannis Sismanis, Rainer Gemulla: On synopses for distinctâvalue estimation under multiset operations. SIGMOD 2007 TODO: Add multi-threaded version
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CorrMatrixBlockcreate(MatrixBlock blkIn)Create a initial sketch of a given block.MatrixBlockgetMatrixValue(CorrMatrixBlock arg0)Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.IntegergetScalarValue(MatrixBlock in)Get scalar distinct count from a input matrix block.CorrMatrixBlockintersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)Intersect two sketchesCorrMatrixBlockunion(CorrMatrixBlock arg0, CorrMatrixBlock arg1)Union two sketches together to from a combined sketch.voidunionSketchByIndex(CorrMatrixBlock arg0, CorrMatrixBlock arg1, int idx, CorrMatrixBlock blkOut)
 
- 
- 
- 
Constructor Detail- 
KMVSketchpublic KMVSketch(Operator op) 
 
- 
 - 
Method Detail- 
getScalarValuepublic Integer getScalarValue(MatrixBlock in) Description copied from interface:MatrixSketchGet scalar distinct count from a input matrix block.- Parameters:
- in- A input block to estimate the number of distinct values in
- Returns:
- The distinct count estimate
 
 - 
getMatrixValuepublic MatrixBlock getMatrixValue(CorrMatrixBlock arg0) Description copied from interface:MatrixSketchObtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.- Parameters:
- arg0- The sketch block to extract the count from
- Returns:
- The result matrix block
 
 - 
createpublic CorrMatrixBlock create(MatrixBlock blkIn) Description copied from interface:MatrixSketchCreate a initial sketch of a given block.- Parameters:
- blkIn- A block to process
- Returns:
- A sketch
 
 - 
unionpublic CorrMatrixBlock union(CorrMatrixBlock arg0, CorrMatrixBlock arg1) Description copied from interface:MatrixSketchUnion two sketches together to from a combined sketch.- Parameters:
- arg0- Sketch one
- arg1- Sketch two
- Returns:
- The combined sketch
 
 - 
unionSketchByIndexpublic void unionSketchByIndex(CorrMatrixBlock arg0, CorrMatrixBlock arg1, int idx, CorrMatrixBlock blkOut) 
 - 
intersectionpublic CorrMatrixBlock intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1) Description copied from interface:MatrixSketchIntersect two sketches- Parameters:
- arg0- Sketch one
- arg1- Sketch two
- Returns:
- The intersected sketch
 
 
- 
 
-