Class BiasedDoubleRange

java.lang.Object
toxi.util.datatypes.DoubleRange
toxi.util.datatypes.BiasedDoubleRange

public class BiasedDoubleRange extends DoubleRange
  • 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

      public BiasedDoubleRange copy()
      Overrides:
      copy in class DoubleRange
    • getBias

      public double getBias()
      Returns:
      the bias
    • getStandardDeviation

      public double getStandardDeviation()
      Returns:
      the standardDeviation
    • pickRandom

      public double pickRandom()
      Overrides:
      pickRandom in class DoubleRange
    • 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

      public String toString()
      Overrides:
      toString in class DoubleRange