public class SampleSet<T> extends Object implements ISampleSet<T>
| Constructor and Description |
|---|
SampleSet() |
SampleSet(int capacity) |
SampleSet(int capacity,
Random random) |
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
protected void |
demote(com.clearspring.analytics.stream.SampleSet.Node<T> node) |
T |
peek() |
List<T> |
peek(int k) |
protected T |
peekMin() |
protected void |
promote(com.clearspring.analytics.stream.SampleSet.Node<T> node) |
long |
put(T element) |
long |
put(T element,
int incrementCount) |
protected T |
removeMin() |
T |
removeRandom() |
int |
size() |
public SampleSet()
public SampleSet(int capacity)
public SampleSet(int capacity,
Random random)
public T peek()
peek in interface ISampleSet<T>public List<T> peek(int k)
peek in interface ISampleSet<T>public long put(T element)
put in interface ISampleSet<T>public long put(T element, int incrementCount)
put in interface ISampleSet<T>public T removeRandom()
removeRandom in interface ISampleSet<T>protected T removeMin()
public int size()
size in interface ISampleSet<T>public long count()
count in interface ISampleSet<T>protected T peekMin()
protected void promote(com.clearspring.analytics.stream.SampleSet.Node<T> node)
protected void demote(com.clearspring.analytics.stream.SampleSet.Node<T> node)
Copyright © 2016 AddThis. All rights reserved.