Package ca.nengo.model.impl

Examples of ca.nengo.model.impl.FunctionInput.run()


    FunctionInput input = new FunctionInput("test", new Function[]{new ConstantFunction(1, 1f), new ConstantFunction(1, 2f)}, Units.UNK);
    Origin origin = input.getOrigin(FunctionInput.ORIGIN_NAME);
    assertEquals(2, origin.getValues().getDimension());
    assertEquals(2, ((RealOutput) origin.getValues()).getValues().length);
   
    input.run(0f, 1f);
    assertEquals(2, origin.getValues().getDimension());
    assertEquals(2, ((RealOutput) origin.getValues()).getValues().length);
    float value = ((RealOutput) origin.getValues()).getValues()[0];
    assertTrue(value > .9f);
    value = ((RealOutput) origin.getValues()).getValues()[1];
View Full Code Here


    assertTrue(input.listStates().get(FunctionInput.STATE_NAME) != null);
   
    assertEquals(1, input.getHistory(FunctionInput.STATE_NAME).getValues().length);
    assertTrue(input.getHistory(FunctionInput.STATE_NAME).getValues()[0][0] > .5f);
   
    input.run(0f, 1f);
   
    assertEquals(1, input.getHistory(FunctionInput.STATE_NAME).getValues().length);
    assertTrue(input.getHistory(FunctionInput.STATE_NAME).getValues()[0][0] > .5f);
  }
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.