Examples of IdentityFunction


Examples of ca.nengo.math.impl.IdentityFunction

   
    func = new FourierFunction(new float[]{1, 0.5f, 1}, new float[]{1, 1, 0.5f}, new float[]{0, -0.5f, 0.2f});
    root = nrf.findRoot(func, -5, 5, 0.0001f);
    TestUtil.assertClose(func.map(new float[]{root}), 0, 0.001f);
   
    func = new IdentityFunction(1, 0);
    root = nrf.findRoot(func, -5, 5, 0.0001f);
    TestUtil.assertClose(func.map(new float[]{root}), 0, 0.001f);
   
    func = new PiecewiseConstantFunction(new float[]{-1,1}, new float[]{2,0,-2});
    try {
View Full Code Here

Examples of ca.nengo.math.impl.IdentityFunction

  }

  private NEFEnsemble createInterneurons(String name, int num, boolean excitatoryProjection) throws StructuralException {
    final Function f;
    if (excitatoryProjection) {
      f = new IdentityFunction(1, 0);
    } else {
      f = new AbstractFunction(1) {
        private static final long serialVersionUID = 1L;
        public float map(float[] from) {
          return 1 + from[0];
View Full Code Here

Examples of ca.nengo.math.impl.IdentityFunction

   * @throws StructuralException
   */
  protected void addDefaultOrigins(NEFEnsemble ensemble) throws StructuralException {
    Function[] functions = new Function[ensemble.getDimension()];
    for (int i = 0; i < functions.length; i++) {
      functions[i] = new IdentityFunction(ensemble.getDimension(), i);
    }

    ensemble.addDecodedOrigin(NEFEnsemble.X, functions, Neuron.AXON);
  }
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.