Class Sampler

  extended by org.strbio.math.IVector
      extended by org.strbio.math.Bin
          extended by org.strbio.math.Sampler

public class Sampler
extends Bin

This is a special case of Bin that samples data and can later return statistics like average, standard deviation. It doesn't keep track of the data, though. It does keep a few more stats than Bin, though.

1.0, 9/29/98

Field Summary
Fields inherited from class org.strbio.math.Bin
binsize, min_v, nsamples, sum_x, sum_x2
Fields inherited from class org.strbio.math.IVector
Constructor Summary
Method Summary
 double maxSampled()
          what's the maximum value we sampled?
 double minSampled()
          what's the minimum value we sampled?
 int sample(double r)
          Sample a value.
Methods inherited from class org.strbio.math.Bin
average, print, print, samples, stdev, stdevp, zScore
Methods inherited from class org.strbio.math.IVector
add, add, cross, cross, dimension, dot, dot, eliminate, equals, length, load, load, max, min, multiply, multiply, multiply, reverse, reverse, save, save, setValue, setValueAt, sort, subtract, subtract, valueAt
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Sampler()
Method Detail


public double minSampled()
what's the minimum value we sampled?


public double maxSampled()
what's the maximum value we sampled?


public int sample(double r)
Description copied from class: Bin
Sample a value. If the value is lower than the minimum value you specified in setting up the bin, the sample goes into the lowest bin. Same thing goes for the high end. This 'rounding off' does not affect statistics like the average.

sample in class Bin