Package org.apache.sysds.runtime.matrix.data.sketch.countdistinctapprox

## Class SmallestPriorityQueue

- java.lang.Object
- - org.apache.sysds.runtime.matrix.data.sketch.countdistinctapprox.SmallestPriorityQueue

-     public class SmallestPriorityQueue
      extends Object

  Deceiving name, but is used to contain the k smallest values inserted. TODO: Replace Standard Java Set and Priority Queue with optimized versions.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SmallestPriorityQueue​(int k)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(double v)` |
    `boolean` | `isEmpty()` |
    `double` | `peek()` |
    `double` | `poll()` |
    `int` | `size()` |
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SmallestPriorityQueue

          public SmallestPriorityQueue​(int k)

  - ### Method Detail

    - #### add

          public void add​(double v)

    - #### size

          public int size()

    - #### peek

          public double peek()

    - #### poll

          public double poll()

    - #### isEmpty

          public boolean isEmpty()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`