Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.util.datatypes
Class BiasedIntegerRange

    java.lang.Object
      toxi.util.datatypes.IntegerRange
          toxi.util.datatypes.BiasedIntegerRange

    public class BiasedIntegerRange

extends IntegerRange

Field Summary
`int` | `bias`
`float` | `standardDeviation`

Fields inherited from class toxi.util.datatypes.IntegerRange
`currValue, max, min`

Constructor Summary
`BiasedIntegerRange()`
`BiasedIntegerRange(int min, int max, int bias, float sd)`

Method Summary
`BiasedIntegerRange` | `copy()`
`int` | `getBias()`
`float` | `getStandardDeviation()`
`int` | `pickRandom()`
`void` | `setBias(int bias)`
`void` | `setStandardDeviation(float sd)`
`java.lang.String` | `toString()`

Methods inherited from class toxi.util.datatypes.IntegerRange
`adjustCurrentBy, fromSamples, getCurrent, getMedian, isValueInRange, seed, setCurrent, setRandom, toArray`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### bias

    public int bias

### standardDeviation

    public float standardDeviation

Constructor Detail

### 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)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD