Package ca.nengo.math.impl

Examples of ca.nengo.math.impl.SigmoidFunction.map()


  /*
   * Test method for 'ca.nengo.math.impl.SigmoidFunction.map(float[])'
   */
  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    TestUtil.assertClose(0.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
View Full Code Here


   * Test method for 'ca.nengo.math.impl.SigmoidFunction.map(float[])'
   */
  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    TestUtil.assertClose(0.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(2.960834f, f.map(new float[]{.8f}), .00001f);
View Full Code Here

   */
  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    TestUtil.assertClose(0.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(2.960834f, f.map(new float[]{.8f}), .00001f);
  }
View Full Code Here

    SigmoidFunction f = new SigmoidFunction();
    TestUtil.assertClose(0.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(2.960834f, f.map(new float[]{.8f}), .00001f);
  }

  /*
 
View Full Code Here

    TestUtil.assertClose(0.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(2.960834f, f.map(new float[]{.8f}), .00001f);
  }

  /*
   * Test method for 'ca.nengo.math.impl.SigmoidFunction.multiMap(float[][])'
View Full Code Here

    TestUtil.assertClose(1f, f.map(new float[]{100}), .00001f);
    TestUtil.assertClose(0.952574f, f.map(new float[]{3}), .00001f);
    f = new SigmoidFunction(0f,1f,2f,3f);
    TestUtil.assertClose(2f, f.map(new float[]{-100}), .00001f);
    TestUtil.assertClose(2.5f, f.map(new float[]{0}), .00001f);
    TestUtil.assertClose(2.960834f, f.map(new float[]{.8f}), .00001f);
  }

  /*
   * Test method for 'ca.nengo.math.impl.SigmoidFunction.multiMap(float[][])'
   */
 
View Full Code Here

   */
  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    NumericallyDifferentiableFunction wrap = new NumericallyDifferentiableFunction(f, 0, 0.1f);
   
    assertEquals(wrap.map(new float[]{0}), f.map(new float[]{0}));
    assertEquals(wrap.map(new float[]{3}), f.map(new float[]{3}));
    assertEquals(wrap.map(new float[]{100}), f.map(new float[]{100}));
  }

  /*
 
View Full Code Here

  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    NumericallyDifferentiableFunction wrap = new NumericallyDifferentiableFunction(f, 0, 0.1f);
   
    assertEquals(wrap.map(new float[]{0}), f.map(new float[]{0}));
    assertEquals(wrap.map(new float[]{3}), f.map(new float[]{3}));
    assertEquals(wrap.map(new float[]{100}), f.map(new float[]{100}));
  }

  /*
   * Test method for 'ca.nengo.math.impl.NumericallyDifferentiableFunction.multiMap(float[][])'
View Full Code Here

    SigmoidFunction f = new SigmoidFunction();
    NumericallyDifferentiableFunction wrap = new NumericallyDifferentiableFunction(f, 0, 0.1f);
   
    assertEquals(wrap.map(new float[]{0}), f.map(new float[]{0}));
    assertEquals(wrap.map(new float[]{3}), f.map(new float[]{3}));
    assertEquals(wrap.map(new float[]{100}), f.map(new float[]{100}));
  }

  /*
   * Test method for 'ca.nengo.math.impl.NumericallyDifferentiableFunction.multiMap(float[][])'
   */
 
View Full Code Here

   */
  public void testMap() {
    SigmoidFunction f = new SigmoidFunction();
    NumericallyDifferentiableFunction wrap = new NumericallyDifferentiableFunction(f, 0, 0.1f);
   
    assertEquals(wrap.map(new float[]{0}), f.map(new float[]{0}));
    assertEquals(wrap.map(new float[]{3}), f.map(new float[]{3}));
    assertEquals(wrap.map(new float[]{100}), f.map(new float[]{100}));
  }

  /*
 
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.