Class GaussianDistributionRandomGenerator

  • All Implemented Interfaces:
    FloatStream

    public class GaussianDistributionRandomGenerator
    extends java.lang.Object
    implements FloatStream
    Generator for Gaussion (normal) distributed random values. References: http://www.dspguru.com/dsp/howtos/how-to-generate-white-gaussian-noise [Jer92] Simulation of Communication Systems by M. C. Jeruchim, P. Balaban and K. S. Shanmugan [Ros88] A First Course on Probability by S. M. Ross
    Author:
    klausj
    • Constructor Detail

      • GaussianDistributionRandomGenerator

        public GaussianDistributionRandomGenerator()
      • GaussianDistributionRandomGenerator

        public GaussianDistributionRandomGenerator​(double mean,
                                                   double variance)
      • GaussianDistributionRandomGenerator

        public GaussianDistributionRandomGenerator​(double mean,
                                                   double variance,
                                                   long length)
      • GaussianDistributionRandomGenerator

        public GaussianDistributionRandomGenerator​(long frameLength)
        Parameters:
        frameLength - length in frames
    • Method Detail

      • generateGaussionDistributedValues

        public Complex generateGaussionDistributedValues()
        Generates gaussion distributed random value. Based on Math.random() method.
        Returns:
        gaussion distributed random value
      • fillWithGaussionDistributedValues

        public void fillWithGaussionDistributedValues​(double[] buf,
                                                      int off,
                                                      int len)
        Generates gaussian distributed random value. Based on Math.random() method.
      • read

        public int read​(double[] buf,
                        int offset,
                        int len)
        Specified by:
        read in interface FloatStream
      • skip

        public long skip​(long skip)
        Specified by:
        skip in interface FloatStream
      • main

        public static void main​(java.lang.String[] args)
        Test method.
        Parameters:
        args -