Package ca.nengo.util.impl

Examples of ca.nengo.util.impl.TimeSeries1DImpl


   */
  public TimeSeries getHistory(String stateName) throws SimulationException {
    TimeSeries1D result = null;

    if (stateName.equals(V)) {
      result = new TimeSeries1DImpl(myTime, myVoltageHistory, Units.AVU);
    } else if (stateName.equals(U)){
      result = new TimeSeries1DImpl(myTime, myRecoveryHistory, Units.UNK);
    } else {
      throw new SimulationException("The state name " + stateName + " is unknown.");
    }

    return result;
View Full Code Here


   */
  public TimeSeries getHistory(String stateName) throws SimulationException {
    TimeSeries1D result = null;

    if (stateName.equals("V")) {
      result = new TimeSeries1DImpl(myTime, myVHistory, Units.AVU);
    } else if (stateName.equalsIgnoreCase("N")) {
      result = new TimeSeries1DImpl(myTime, myNHistory, Units.UNK);
    } else if (stateName.equalsIgnoreCase("rate")) {
      result = new TimeSeries1DImpl(myTime, myRateHistory, Units.SPIKES_PER_S);
    } else {
      throw new SimulationException("The state name " + stateName + " is unknown.");
    }

    return result;
View Full Code Here

  private float[] getDynamicDecoder(int i, float input, float startTime, float endTime) {
    float[] result = myDecoders[i];
    if (mySTPDynamicsTemplate != null) { //TODO: could use a NullDynamics here instead of null (to allow nulling in config tree)
      //TODO: could recycle a mutable time series here to avoid object creation
      TimeSeries inputSeries = new TimeSeries1DImpl(new float[]{startTime, endTime}, new float[]{input, input}, Units.UNK);
      TimeSeries outputSeries = myIntegrator.integrate(mySTPDynamics[i], inputSeries);
      float scaleFactor = outputSeries.getValues()[outputSeries.getValues().length-1][0];
      mySTPHistory[i] = scaleFactor;
      result = MU.prod(result, scaleFactor);
    }
View Full Code Here

TOP

Related Classes of ca.nengo.util.impl.TimeSeries1DImpl

Copyright © 2018 www.massapicom. 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.