public class FloatHeapSelect
extends java.lang.Object
| Constructor and Description |
|---|
FloatHeapSelect(float[] heap)
Constructor.
|
FloatHeapSelect(int k)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(float datum)
Assimilate a new value from the stream.
|
float |
get(int i)
Returns the i-th smallest value seen so far.
|
float |
peek()
Returns the k-th smallest value seen so far.
|
void |
sort()
Sort the smallest values.
|
public FloatHeapSelect(int k)
k - the heap size.public FloatHeapSelect(float[] heap)
heap - the array to store smallest values to track.public void add(float datum)
public float peek()
public float get(int i)
public void sort()