Package ca.nengo.model

Examples of ca.nengo.model.Termination


    // Plotter.plot(integrator);
    // Plotter.plot(integrator, NEFEnsemble.X);

    float tau = .05f;

    Termination interm = integrator.addDecodedTermination("input",
        new float[][] { new float[] { tau } }, tau, false);
    // Termination interm = integrator.addDecodedTermination("input", new
    // float[][]{new float[]{1f}}, tau);
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), interm);

    Termination fbterm = integrator.addDecodedTermination("feedback",
        new float[][] { new float[] { 1f } }, tau, false);
    network.addProjection(integrator.getOrigin(NEFEnsemble.X), fbterm);

    // System.out.println("Network creation: " + (System.currentTimeMillis()
    // - start));
View Full Code Here


  /**
   * @see ca.nengo.model.Network#exposeTermination(ca.nengo.model.Termination, java.lang.String)
   */
  public void exposeTermination(Termination termination, String name) {
    Termination term;
   
      term = new TerminationWrapper(this, termination, name);
     
      myExposedTerminations.put(name, term);
      myExposedTerminationNames.put(termination, name);
View Full Code Here

  /**
   * @see ca.nengo.model.Network#hideTermination(java.lang.String)
   */
  public void hideTermination(String name) {
    Termination term = myExposedTerminations.get(name);
   
    if(term == null) return;
   
    OrderedExposedTerminations.remove(term);
    TerminationWrapper termination = (TerminationWrapper)myExposedTerminations.remove(name);
View Full Code Here

    result.myProjectionMap = new HashMap<Termination, Projection>(10);
    for (Projection oldProjection : getProjections()) {
      try {
        Origin newOrigin = result.getNode(oldProjection.getOrigin().getNode().getName())
          .getOrigin(oldProjection.getOrigin().getName());
        Termination newTermination = result.getNode(oldProjection.getTermination().getNode().getName())
          .getTermination(oldProjection.getTermination().getName());
        Projection newProjection = new ProjectionImpl(newOrigin, newTermination, result);
        result.myProjectionMap.put(newTermination, newProjection);
      } catch (StructuralException e) {
        throw new CloneNotSupportedException("Problem copying Projectio: " + e.getMessage());
      }
    }

    result.myExposedOrigins = new HashMap<String, Origin>(10);
    result.myExposedOriginNames = new HashMap<Origin, String>(10);
    result.OrderedExposedOrigins = new LinkedList <Origin> ();
    for (Origin exposed : getOrigins()) {
      String name = exposed.getName();
      Origin wrapped = ((OriginWrapper) exposed).getWrappedOrigin();
      try {
        // Check to see if referenced node is the network itself. If it is, handle the origin differently.
        if (wrapped.getNode().getName() != myName ) {
          Origin toExpose = result.getNode(wrapped.getNode().getName()).getOrigin(wrapped.getName());
          result.exposeOrigin(toExpose, name);
        }
      } catch (StructuralException e) {
        throw new CloneNotSupportedException("Problem exposing Origin: " + e.getMessage());
      }
    }

    result.myExposedTerminations = new HashMap<String, Termination>(10);
    result.myExposedTerminationNames = new HashMap<Termination, String>(10);
    result.OrderedExposedTerminations = new LinkedList <Termination> ();
    for (Termination exposed : getTerminations()) {
      String name = exposed.getName();
      Termination wrapped = ((TerminationWrapper) exposed).getWrappedTermination();
      try {
        // Check to see if referenced node is the network itself. If it is, handle the termination differently.
        if (wrapped.getNode().getName() != myName ) {
          Termination toExpose = result.getNode(wrapped.getNode().getName()).getTermination(wrapped.getName());
          result.exposeTermination(toExpose, name);
        }
      } catch (StructuralException e) {
        throw new CloneNotSupportedException("Problem exposing Termination: " + e.getMessage());
      }
View Full Code Here

TOP

Related Classes of ca.nengo.model.Termination

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.