ptolemy.math
Class SignalProcessing.GaussianSampleGenerator
java.lang.Object
ptolemy.math.SignalProcessing.GaussianSampleGenerator
- All Implemented Interfaces:
- DoubleUnaryOperation
- Enclosing class:
- SignalProcessing
public static class SignalProcessing.GaussianSampleGenerator
- extends java.lang.Object
- implements DoubleUnaryOperation
This class generates samples of a Gaussian function with the
specified mean and standard deviation.
The function computed is :
h(t) = (1/(sqrt(2 * PI) * stdDev) *
exp(-(t - mean)2 / (2 * stdDev2))
Method Summary |
double |
operate(double time)
Return a sample of the Gaussian function, sampled at the
specified time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_mean
private final double _mean
_oneOverTwoVariance
private final double _oneOverTwoVariance
_factor
private final double _factor
ONE_OVER_SQRT_TWO_PI
private static final double ONE_OVER_SQRT_TWO_PI
SignalProcessing.GaussianSampleGenerator
public SignalProcessing.GaussianSampleGenerator(double mean,
double standardDeviation)
- Construct a GaussianSampleGenerator.
- Parameters:
standardDeviation
- The standard deviation of the
Gaussian function.
operate
public final double operate(double time)
- Return a sample of the Gaussian function, sampled at the
specified time.
- Specified by:
operate
in interface DoubleUnaryOperation
- Parameters:
time
- The operand.
- Returns:
- The results of the operation.