org.smallmind.instrument
Class UniformSample

java.lang.Object
  extended by 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.


Constructor Summary
UniformSample(int reservoirSize)
           
 
Method Summary
 void clear()
           
 Snapshot getSnapshot()
           
 Samples getType()
           
 int size()
           
 void update(long value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformSample

public UniformSample(int reservoirSize)
Method Detail

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.