aim4.noise
Class BasicNoiseFunction

java.lang.Object
  extended by aim4.noise.BasicNoiseFunction
All Implemented Interfaces:
NoiseFunction

public class BasicNoiseFunction
extends Object
implements NoiseFunction

Singleton class representing the null NoiseFunction. This function does nothing to values to which it is applied.


Field Summary
static BasicNoiseFunction noNoise
          Holds the one instance of the singleton class.
 
Method Summary
 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

noNoise

public static BasicNoiseFunction noNoise
Holds the one instance of the singleton class.

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 © 2011. All Rights Reserved.