Package util

Examples of util.Gaussian


    int numZScores = 10;
    int size = 200;
    double stdev = 20;
    double multiplier = 1000;
   
    Gaussian g = new Gaussian(size,stdev,multiplier);
   
    double[][] randomZScores = g.getNumRandomZScores(numZScores);
   
    assert(    Util.arrayContains(g.getRandomVar(), randomZScores[0])
        && Util.arrayContains(g.getPDF(), randomZScores[1]));
  }
View Full Code Here


  {
    int size = 200;
    double stdev = 20;
    double multiplier = 1000;
   
    Gaussian g = new Gaussian(size,stdev,multiplier);
   
    assert ( Util.arrayContains(g.getPDF(), g.getRandomValue()));
  }
View Full Code Here

  }

  @Test
  public void testIsEmpty()
  {
    Gaussian g = new Gaussian();
   
    assert (g.isEmpty());
  }
View Full Code Here

  public void testScaleZScores()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    double scale = 100;
   
    Gaussian g = new Gaussian(zscores);
   
    for (int x=0; x < zscores.length; x++) zscores[x] *= scale;
   
    g.scaleZScores(scale);
   
    assert( Util.compareArraysByValue(g.getPDF(),zscores));
  }
View Full Code Here

  public void testGetMean()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    double mean = Util.arrayMean(zscores);
   
    Gaussian g = new Gaussian(zscores);
   
    assert( g.getMean() == mean);
  }
View Full Code Here

  public void testGetStandardDeviation()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    double stdev = Util.standardDeviation(zscores);
   
    Gaussian g = new Gaussian(zscores);
   
    assert( g.getStandardDeviation() == stdev);
  }
View Full Code Here

TOP

Related Classes of util.Gaussian

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.