Constructor and Description |
---|
StochasticTopper(int sampleSize) |
StochasticTopper(int sampleSize,
Long seed) |
Modifier and Type | Method and Description |
---|---|
boolean |
offer(T item)
offer a single element to the top.
|
boolean |
offer(T item,
int incrementCount)
offer a single element to the top and increment the count
for that element by incrementCount.
|
List<T> |
peek(int k)
Retrieve top k items
|
public StochasticTopper(int sampleSize)
public StochasticTopper(int sampleSize, Long seed)
public boolean offer(T item, int incrementCount)
ITopK
public boolean offer(T item)
ITopK
Copyright © 2019. All rights reserved.