aim4.noise

## Class GaussianNoiseFunction

- java.lang.Object
- - aim4.noise.GaussianNoiseFunction

- All Implemented Interfaces:
    NoiseFunction

      public class GaussianNoiseFunction
      extends Object
      implements NoiseFunction

  NoiseFunction that adds Gaussian noise to a value.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Random` | `rnd` Random seed for creating noise.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GaussianNoiseFunction(double standardDeviation)` Class constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `apply(double trueValue)` Apply the noise function to the given value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### rnd

          protected static Random rnd

      Random seed for creating noise.

  - ### Constructor Detail

    - #### GaussianNoiseFunction

          public GaussianNoiseFunction(double standardDeviation)

      Class constructor. Takes the standard deviation of the Gaussian and uses it to generate noise with mean zero.
      Parameters:
        `standardDeviation` - the standard deviation of the desired Gaussian

  - ### Method Detail

    - #### apply

          public double apply(double trueValue)

      Apply the noise function to the given value.
      Specified by:
        `apply` in interface `NoiseFunction`
      Parameters:
        `trueValue` - the actual value of the quantity.
      Returns:
        the value of the quantity with noise added.

Copyright © 2013. All rights reserved.