Package toxi.util.datatypes
Class BiasedDoubleRange
java.lang.Object
toxi.util.datatypes.DoubleRange
toxi.util.datatypes.BiasedDoubleRange
-
Field Summary
Fields inherited from class toxi.util.datatypes.DoubleRange
currValue, max, min -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()doublegetBias()doubledoublevoidsetBias(double bias) voidsetStandardDeviation(double sd) toString()Methods inherited from class toxi.util.datatypes.DoubleRange
adjustCurrentBy, fromSamples, fromSamples, getAt, getCurrent, getMedian, getRange, isValueInRange, seed, setCurrent, setRandom, toArray
-
Constructor Details
-
BiasedDoubleRange
public BiasedDoubleRange() -
BiasedDoubleRange
public BiasedDoubleRange(double min, double max, double bias, double 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 mean sd=1.0, the entire range will be covered)
-
-
Method Details
-
copy
- Overrides:
copyin classDoubleRange
-
getBias
public double getBias()- Returns:
- the bias
-
getStandardDeviation
public double getStandardDeviation()- Returns:
- the standardDeviation
-
pickRandom
public double pickRandom()- Overrides:
pickRandomin classDoubleRange
-
setBias
public void setBias(double bias) - Parameters:
bias- the bias to set
-
setStandardDeviation
public void setStandardDeviation(double sd) - Parameters:
sd- the standardDeviation to set
-
toString
- Overrides:
toStringin classDoubleRange
-