Class GrowableLongHeap

java.lang.Object
io.github.jbellis.jvector.util.AbstractLongHeap
io.github.jbellis.jvector.util.GrowableLongHeap

public class GrowableLongHeap extends AbstractLongHeap
An AbstractLongHeap that can grow in size (unbounded, except for memory and array size limits).
  • Field Details

    • size

      protected int size
  • Constructor Details

    • GrowableLongHeap

      public GrowableLongHeap(int initialSize)
      Create an empty heap with the configured initial size.
      Parameters:
      initialSize - the initial size of the heap
  • Method Details

    • push

      public boolean push(long element)
      Adds a value to an LongHeap in log(size) time.
      Specified by:
      push in class AbstractLongHeap
      Returns:
      true always