Package io.github.jbellis.jvector.util
Class GrowableLongHeap
java.lang.Object
io.github.jbellis.jvector.util.AbstractLongHeap
io.github.jbellis.jvector.util.GrowableLongHeap
An AbstractLongHeap that can grow in size (unbounded, except for memory and array size limits).
-
Field Summary
Fields inherited from class io.github.jbellis.jvector.util.AbstractLongHeap
heap
-
Constructor Summary
ConstructorDescriptionGrowableLongHeap
(int initialSize) Create an empty heap with the configured initial size. -
Method Summary
Modifier and TypeMethodDescriptionboolean
push
(long element) Adds a value to an LongHeap in log(size) time.
-
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 classAbstractLongHeap
- Returns:
- true always
-