Class 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
    • Constructor Detail

      • KMVSketch

        public KMVSketch​(Operator op)
    • Method Detail

      • getScalarValue

        public Integer getScalarValue​(MatrixBlock in)
        Description copied from interface: MatrixSketch
        Get 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
      • getMatrixValue

        public MatrixBlock getMatrixValue​(CorrMatrixBlock arg0)
        Description copied from interface: MatrixSketch
        Obtain 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
      • create

        public CorrMatrixBlock create​(MatrixBlock blkIn)
        Description copied from interface: MatrixSketch
        Create a initial sketch of a given block.
        Parameters:
        blkIn - A block to process
        Returns:
        A sketch