toxi.util.datatypes
Class BiasedIntegerRange
java.lang.Object
toxi.util.datatypes.IntegerRange
toxi.util.datatypes.BiasedIntegerRange
public class BiasedIntegerRange
- extends IntegerRange
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
bias
public int bias
standardDeviation
public float standardDeviation
BiasedIntegerRange
public BiasedIntegerRange()
BiasedIntegerRange
public BiasedIntegerRange(int min,
int max,
int bias,
float sd)
- Parameters:
min
- min value (inclusive)max
- max value (inclusive)bias
- bias value (can be outside the min/max range, but values will
be clipped)sd
- standard deviation (if bias at range means sd=1.0, the entire
range will be covered)
copy
public BiasedIntegerRange copy()
- Overrides:
copy
in class IntegerRange
getBias
public int getBias()
- Returns:
- the bias
getStandardDeviation
public float getStandardDeviation()
- Returns:
- the standardDeviation
pickRandom
public int pickRandom()
- Overrides:
pickRandom
in class IntegerRange
setBias
public void setBias(int bias)
- Parameters:
bias
- the bias to set
setStandardDeviation
public void setStandardDeviation(float sd)
- Parameters:
sd
- the standardDeviation to set
toString
public java.lang.String toString()
- Overrides:
toString
in class IntegerRange