Class 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 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()
      • clear

        public void clear()