org.smallmind.instrument
Class UniformSample
java.lang.Object
org.smallmind.instrument.UniformSample
- All Implemented Interfaces:
- Sample, Shutterbug
public class UniformSample
- extends Object
- implements Sample
Uses Vitter's Algorithm R to produce a statistically representative sample.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniformSample
public UniformSample(int reservoirSize)
getType
public Samples getType()
- Specified by:
getType in interface Sample
clear
public void clear()
- Specified by:
clear in interface Sample
size
public int size()
- Specified by:
size in interface Sample
update
public void update(long value)
- Specified by:
update in interface Sample
getSnapshot
public Snapshot getSnapshot()
- Specified by:
getSnapshot in interface Shutterbug
Copyright © 2012. All Rights Reserved.