Package ca.nengo.model.neuron.impl

Examples of ca.nengo.model.neuron.impl.LinearSynapticIntegrator.run()


   
    t[0].setValues(spike);
    t[1].setValues(spike);
    t[2].setValues(spike);
   
    TimeSeries1D current = si.run(0f, .01f);
    assertEquals(11, current.getTimes().length);
    assertTrue(current.getValues1D()[0] > 1.99f && current.getValues1D()[0] < 2.01f);
    for (int i = 1; i < current.getTimes().length; i++) {
      assertTrue(current.getValues1D()[i] < current.getValues1D()[i-1]); //decaying
    }
View Full Code Here


    si.addTermination("test", new float[]{1f}, 1f, false);
   
    Termination t = si.getTerminations()[0];
    t.setValues(new SpikeOutputImpl(new boolean[]{true}, Units.SPIKES, 0));   
    for (int i = 0; i < 10; i++) {
      si.run(.001f * ((float) i), .001f * ((float) i+1));     
      t.setValues(new SpikeOutputImpl(new boolean[]{false}, Units.SPIKES, 0));
    }
    TimeSeries1D current = si.run(.010f, .011f);
    assertTrue(current.getValues()[1][0] > .9f);
   
View Full Code Here

    t.setValues(new SpikeOutputImpl(new boolean[]{true}, Units.SPIKES, 0));   
    for (int i = 0; i < 10; i++) {
      si.run(.001f * ((float) i), .001f * ((float) i+1));     
      t.setValues(new SpikeOutputImpl(new boolean[]{false}, Units.SPIKES, 0));
    }
    TimeSeries1D current = si.run(.010f, .011f);
    assertTrue(current.getValues()[1][0] > .9f);
   
    si.reset(false); //there is no random setting to test
    current = si.run(.011f, .012f);
    assertTrue(current.getValues1D()[1] < .01f);
View Full Code Here

    }
    TimeSeries1D current = si.run(.010f, .011f);
    assertTrue(current.getValues()[1][0] > .9f);
   
    si.reset(false); //there is no random setting to test
    current = si.run(.011f, .012f);
    assertTrue(current.getValues1D()[1] < .01f);
  }

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