Package ca.nengo.math.impl

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


  public void testGetDerivative() {
    SigmoidFunction f = new SigmoidFunction(-1f,0.5f,1f,2f);
    AbstractFunction g = (AbstractFunction)f.getDerivative();
   
    assertEquals(1, g.getDimension());
    TestUtil.assertClose(0.209987f, g.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(0.5f, g.map(new float[]{-1f}), .00001f);
    TestUtil.assertClose(0.000670475f, g.map(new float[]{3f}), .00001f);
  }

}
View Full Code Here


    SigmoidFunction f = new SigmoidFunction(-1f,0.5f,1f,2f);
    AbstractFunction g = (AbstractFunction)f.getDerivative();
   
    assertEquals(1, g.getDimension());
    TestUtil.assertClose(0.209987f, g.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(0.5f, g.map(new float[]{-1f}), .00001f);
    TestUtil.assertClose(0.000670475f, g.map(new float[]{3f}), .00001f);
  }

}
View Full Code Here

    AbstractFunction g = (AbstractFunction)f.getDerivative();
   
    assertEquals(1, g.getDimension());
    TestUtil.assertClose(0.209987f, g.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(0.5f, g.map(new float[]{-1f}), .00001f);
    TestUtil.assertClose(0.000670475f, g.map(new float[]{3f}), .00001f);
  }

}
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.