Package ca.nengo.math.impl

Examples of ca.nengo.math.impl.GaussianPDF.sample()


   */
  public void testSample() {
    int n = 1000;
   
    GaussianPDF pdf = new GaussianPDF(0f, 1f);
    assertEquals(1, pdf.sample().length);
   
    int c = 0;
    for (int i = 0; i < n; i++) {
      float sample = pdf.sample()[0];
      if (sample > -1f && sample < 1f) c++;
View Full Code Here


    GaussianPDF pdf = new GaussianPDF(0f, 1f);
    assertEquals(1, pdf.sample().length);
   
    int c = 0;
    for (int i = 0; i < n; i++) {
      float sample = pdf.sample()[0];
      if (sample > -1f && sample < 1f) c++;
    }
    ourLogger.info("GaussianPDFTest c: " + c);
    assertTrue(c > 620 && c < 740); //should be about 682 but will vary randomly
View Full Code Here

    }
    ourLogger.info("GaussianPDFTest c: " + c);
    assertTrue(c > 620 && c < 740); //should be about 682 but will vary randomly

    pdf = new GaussianPDF(-10f, 4f);
    assertEquals(1, pdf.sample().length);
   
    c = 0;
    for (int i = 0; i < n; i++) {
      float sample = pdf.sample()[0];
      if (sample > -12f && sample < -8f) c++;
View Full Code Here

    pdf = new GaussianPDF(-10f, 4f);
    assertEquals(1, pdf.sample().length);
   
    c = 0;
    for (int i = 0; i < n; i++) {
      float sample = pdf.sample()[0];
      if (sample > -12f && sample < -8f) c++;
    }
    ourLogger.info("GaussianPDFTest c: " + c);
    assertTrue(c > 620 && c < 740);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.