org.strbio.math
Class Sampler
java.lang.Object
org.strbio.math.IVector
org.strbio.math.Bin
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.
- Version:
- 1.0, 9/29/98
- Author:
- JMC
Fields inherited from class org.strbio.math.IVector |
data |
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.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 |
Sampler
public Sampler()
minSampled
public double minSampled()
- what's the minimum value we sampled?
maxSampled
public double maxSampled()
- what's the maximum value we sampled?
sample
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.
- Overrides:
sample
in class Bin