Package ca.nengo.model

Examples of ca.nengo.model.InstantaneousOutput


  /**
   * @see ca.nengo.model.neuron.SpikeGenerator#run(float[], float[])
   */
  public InstantaneousOutput run(float[] time, float[] current) {
    InstantaneousOutput result = null;

    if (myMode.equals(SimulationMode.CONSTANT_RATE)) {
      result = new RealOutputImpl(new float[]{myRateFunction.map(new float[]{current[0]})}, Units.SPIKES_PER_S, time[time.length-1]);
    } else if (myMode.equals(SimulationMode.RATE)) {
      float totalTimeSpan = time[time.length-1] - time[0];
View Full Code Here


   *
   * @see LinearExponentialTermination#setValues(InstantaneousOutput)
   */
  public void setValues(InstantaneousOutput values) throws SimulationException {
    myQueue.add(values);
    InstantaneousOutput v = myQueue.remove(0);
    super.setValues(v);
  }
View Full Code Here

                    if (pet instanceof ModulatedPlasticEnsembleTermination) {
                        DecodedTermination modTerm = (DecodedTermination)
                            this.getTermination(((ModulatedPlasticEnsembleTermination) pet).getModTermName());

                        InstantaneousOutput input = new RealOutputImpl(modTerm.getOutput(), Units.UNK, endTime);
                        ((ModulatedPlasticEnsembleTermination) pet).setModTerminationState
                          (modTerm.getName(), input, endTime);
                    }
                }
                catch (StructuralException e) {
View Full Code Here

      }
     
    }

    public InstantaneousOutput getValues() throws SimulationException {
      InstantaneousOutput v0 = myOrigins[0].getValues();
     
      Units unit = v0.getUnits();
      float time = v0.getTime();
     
      if(v0 instanceof PreciseSpikeOutputImpl) {
        float[] vals = new float[myDimensions];
        int d=0;
        for(int i=0; i < myOrigins.length; i++) {
View Full Code Here

      // TODO: Implement this?
      return;
    }

    public InstantaneousOutput getValues() throws SimulationException {
      InstantaneousOutput v0 = myOrigins[0].getValues();
     
      Units unit = v0.getUnits();
      float time = v0.getTime();
     
      if(v0 instanceof RealOutputImpl) {
        float[] vals = new float[myOrigins[0].getDimensions()];
        for(int i = 0; i < myOrigins.length; i++) {
          float[] ovals = ((RealOutputImpl)myOrigins[i].getValues()).getValues();
View Full Code Here

    float dN = - myN / myTauN;
    myN = Math.max(0, myN + dt*dN);

    float I = I_in - G_N*myN;

    InstantaneousOutput result = null;
    if (myMode.equals(SimulationMode.DEFAULT) || myMode.equals(SimulationMode.PRECISE)) {
      myTimeSinceLastSpike = myTimeSinceLastSpike + dt;

      float dV = (1 / myTauRC) * (I*R - myV);
      if (myTimeSinceLastSpike < myTauRef) {
View Full Code Here

     
      values = myExpressModel.getOutput(startTime, state, values);
    } else {
      for (int i = 0; i < myNodes.length; i++) {
        try {
          InstantaneousOutput o = myNodes[i].getOrigin(myNodeOrigin).getValues();

          float val = 0;
          if (o instanceof SpikeOutput) {
            val = ((SpikeOutput) o).getValues()[0] ? 1f / stepSize : 0f;
          } else if (o instanceof RealOutput) {
            val = ((RealOutput) o).getValues()[0];
          } else {
            throw new Error("Node output is of type " + o.getClass().getName()
              + ". DecodedOrigin can only deal with RealOutput and SpikeOutput, so it apparently has to be updated");
          }

          float[] decoder = getDynamicDecoder(i, val, startTime, endTime);
          for (int j = 0; j < values.length; j++) {
View Full Code Here

TOP

Related Classes of ca.nengo.model.InstantaneousOutput

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.