Examples of IdentityFunction


Examples of br.com.six2six.fixturefactory.function.IdentityFunction

    this.name = name;
    this.function = function;
  }

  public Property(String name, Object value) {
      this(name, new IdentityFunction(value));
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.IdentityFunction

        this.properties.add(new Property(property, value));
    }

    public void add(String property, Function function) {
        if (function == null) {
            function = new IdentityFunction(null);
        }
      this.properties.add(new Property(property, function));
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.IdentityFunction

    }
   
    @Test
    public void shouldReturnValueFromIdentityFunction() {
        String value = "some name";
        Property property = new Property("attr", new IdentityFunction(value));
        assertEquals(value, property.getValue());
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.IdentityFunction

        assertEquals(value, property.getValue());
    }

    @Test
    public void shouldReturnNullFromIdentityFunction() {
        Property property = new Property("attr", new IdentityFunction(null));
        assertEquals(null, property.getValue());
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.IdentityFunction

        this.properties.add(new Property(property, value));
    }

    public void add(String property, Function function) {
        if (function == null) {
            function = new IdentityFunction(null);
        }
      this.properties.add(new Property(property, function));
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.IdentityFunction

    this.name = name;
    this.function = function;
  }

  public Property(String name, Object value) {
      this(name, new IdentityFunction(value));
  }
View Full Code Here

Examples of ca.nengo.math.impl.IdentityFunction

//    assertTrue(error2 > 1e-10 && error2 < 3.5e-4 && error2 < error);
//  }

  public void testAddBias2D() throws StructuralException, SimulationException {
    Network network = new NetworkImpl();
    FunctionInput input = new FunctionInput("input", new Function[]{new IdentityFunction(1, 0)}, Units.UNK);
    network.addNode(input);
    NEFEnsembleFactory ef = new NEFEnsembleFactoryImpl();
    int n = 300;
    NEFEnsemble pre = ef.make("pre", n, 2);
    pre.addDecodedTermination("input", MU.uniform(2, 1, 1), .005f, false);
View Full Code Here

Examples of ca.nengo.math.impl.IdentityFunction

  /*
   * Test method for 'ca.nengo.math.impl.IdentityFunction.getDimension()'
   */
  public void testGetDimension() {
    IdentityFunction f = new IdentityFunction(3, 0);
    assertEquals(3, f.getDimension());
  }
View Full Code Here

Examples of ca.nengo.math.impl.IdentityFunction

  /*
   * Test method for 'ca.nengo.math.impl.IdentityFunction.map(float[])'
   */
  public void testMap() {
    IdentityFunction f = new IdentityFunction(3, 0);
    TestUtil.assertClose(.1f, f.map(new float[]{.1f, .2f, .3f}), .00001f);

    f = new IdentityFunction(3, 1);
    TestUtil.assertClose(.2f, f.map(new float[]{.1f, .2f, .3f}), .00001f);
  }
View Full Code Here

Examples of ca.nengo.math.impl.IdentityFunction

  /*
   * Test method for 'ca.nengo.math.impl.IdentityFunction.multiMap(float[][])'
   */
  public void testMultiMap() {
    IdentityFunction f = new IdentityFunction(3, 0);

    float[] values = f.multiMap(new float[][]{new float[]{.1f, .2f, .3f}, new float[]{.2f, .3f, .4f}});
    TestUtil.assertClose(.1f, values[0], .00001f);
    TestUtil.assertClose(.2f, values[1], .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.