Package ca.nengo.model

Examples of ca.nengo.model.SimulationMode


    arrayOfMe.add(this);
   
    menu.addAction(new CopyAction("Copy", arrayOfMe));
    menu.addAction(new CutAction("Cut", arrayOfMe));

    SimulationMode mode = ((UINeoNode) arrayOfMe.toArray()[0]).getModel().getMode();

    int selected = -1;
    if (mode == SimulationMode.DEFAULT) {
      selected = 0;
    } else if (mode == SimulationMode.RATE) {
View Full Code Here


      float[][] idealOutput = new float[x.length][];
      float[][] actualOutput = new float[x.length][];

      NEFNode[] nodes = (NEFNode[]) ensemble.getNodes();
     
      SimulationMode mode = ensemble.getMode();
      float radius = ensemble.getRadii()[0];
      for (int i = 0; i < x.length; i++) {
        x[i] = -radius + (float) i * (2f*radius / (float) (x.length-1));
               
        ensemble.setMode(SimulationMode.CONSTANT_RATE);
View Full Code Here

      float[] x = new float[101];
      for (int i = 0; i < x.length; i++) {
        x[i] = -1f + (float) i * (2f / (float) (x.length-1));
      }
     
      SimulationMode mode = ensemble.getMode();
      ensemble.setMode(SimulationMode.CONSTANT_RATE);
     
     
     
      float[][] rates = new float[nodes.length][];
View Full Code Here

//    float tauN = tau / (1 - g_N*A_N*alpha*tau);
    ((ALIFSpikeGenerator) neuron.getGenerator()).setTauN(tauN);
  }

  private static float getSlope(SpikingNeuron neuron) {
    SimulationMode mode = neuron.getMode();
    float slope = 0;

    try {
      neuron.setMode(SimulationMode.CONSTANT_RATE);
      neuron.setRadialInput(-1);
View Full Code Here

  private void setConstantRateFunction() {
    //make sure currents are in ascending order
    Arrays.sort(myCurrents);

    SimulationMode mode = myMode;
    myMode = SimulationMode.DEFAULT;
    float dt = .001f;
    float simTime = 1f;
    float[] rates = new float[myCurrents.length];
    for (int i = 0; i < myCurrents.length; i++) {
View Full Code Here

    float[] result = new float[evalPoints.length];

    NEFNode node = (NEFNode) getNodes()[nodeIndex];
    synchronized (node) {
      SimulationMode mode = node.getMode();

      node.setMode(SimulationMode.CONSTANT_RATE);
      if ( !node.getMode().equals(SimulationMode.CONSTANT_RATE) ) {
        throw new StructuralException(
          "To find decoders using this method, all Nodes must support CONSTANT_RATE simulation mode");
View Full Code Here

  {
    float[][] result = new float[evalSignals.length][];

    NEFNode node = (NEFNode) getNodes()[nodeIndex];
    synchronized (node) {
      SimulationMode mode = node.getMode();

      node.setMode(SimulationMode.RATE);
      if ( !node.getMode().equals(SimulationMode.RATE) ) {
        throw new StructuralException(
          "To find decoders using this method, all Nodes must support RATE simulation mode");
View Full Code Here

      output = new float[input.length][];

      NEFNode[] nodes = (NEFNode[]) ensemble.getNodes();
     
      synchronized (ensemble){
        SimulationMode oldMode = ensemble.getMode();     
        ensemble.setMode(mode);
       
        for (int i = 0; i < input.length; i++) {
          if (mode.equals(SimulationMode.DIRECT) || mode.equals(SimulationMode.EXPRESS)) {
            origin.run(input[i], 0f, 1f);
View Full Code Here

TOP

Related Classes of ca.nengo.model.SimulationMode

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.