Package ca.nengo.math

Examples of ca.nengo.math.PDF.map()


  /*
   * Test method for 'ca.nengo.math.impl.IndicatorPDF.map(float[])'
   */
  public void testMap() {
    PDF pdf = new IndicatorPDF(-1, 1);
    assertClose(0f, pdf.map(new float[]{-1.5f}));
    assertClose(.5f, pdf.map(new float[]{-0.5f}));
    assertClose(.5f, pdf.map(new float[]{0.5f}));
    assertClose(0f, pdf.map(new float[]{1.5f}));
   
    pdf = new IndicatorPDF(5, 5);
View Full Code Here


   * Test method for 'ca.nengo.math.impl.IndicatorPDF.map(float[])'
   */
  public void testMap() {
    PDF pdf = new IndicatorPDF(-1, 1);
    assertClose(0f, pdf.map(new float[]{-1.5f}));
    assertClose(.5f, pdf.map(new float[]{-0.5f}));
    assertClose(.5f, pdf.map(new float[]{0.5f}));
    assertClose(0f, pdf.map(new float[]{1.5f}));
   
    pdf = new IndicatorPDF(5, 5);
    assertEquals(Float.POSITIVE_INFINITY, pdf.map(new float[]{5}));
View Full Code Here

   */
  public void testMap() {
    PDF pdf = new IndicatorPDF(-1, 1);
    assertClose(0f, pdf.map(new float[]{-1.5f}));
    assertClose(.5f, pdf.map(new float[]{-0.5f}));
    assertClose(.5f, pdf.map(new float[]{0.5f}));
    assertClose(0f, pdf.map(new float[]{1.5f}));
   
    pdf = new IndicatorPDF(5, 5);
    assertEquals(Float.POSITIVE_INFINITY, pdf.map(new float[]{5}));
  }
View Full Code Here

  public void testMap() {
    PDF pdf = new IndicatorPDF(-1, 1);
    assertClose(0f, pdf.map(new float[]{-1.5f}));
    assertClose(.5f, pdf.map(new float[]{-0.5f}));
    assertClose(.5f, pdf.map(new float[]{0.5f}));
    assertClose(0f, pdf.map(new float[]{1.5f}));
   
    pdf = new IndicatorPDF(5, 5);
    assertEquals(Float.POSITIVE_INFINITY, pdf.map(new float[]{5}));
  }
View Full Code Here

    assertClose(.5f, pdf.map(new float[]{-0.5f}));
    assertClose(.5f, pdf.map(new float[]{0.5f}));
    assertClose(0f, pdf.map(new float[]{1.5f}));
   
    pdf = new IndicatorPDF(5, 5);
    assertEquals(Float.POSITIVE_INFINITY, pdf.map(new float[]{5}));
  }

  /*
   * Test method for 'ca.nengo.math.impl.IndicatorPDF.multiMap(float[][])'
   */
 
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.