Package ca.nengo.model

Examples of ca.nengo.model.Node


   
    public ComparableNodeWrapper(Ensemble ensemble, int nodeIndex) {
      myIndex = nodeIndex;
     
      myBias = 1;
      Node node = ensemble.getNodes()[nodeIndex];
      if (node instanceof SpikingNeuron) {
        myBias = ((SpikingNeuron) node).getBias();
      }
     
      myFirstDimEncoder = 1;
View Full Code Here


       
        fireVisibleChangeEvent();
    }

    private Probeable getNode(String nodeName) throws SimulationException {
        Node result = myNodeMap.get(nodeName);

        if (result == null) {
            throw new SimulationException("The named Node does not exist");
        }
View Full Code Here

        return (Probeable) result;
    }

    private Probeable getNeuron(String nodeName, int index)
            throws SimulationException {
        Node ensemble = myNodeMap.get(nodeName);

        if (ensemble == null) {
            throw new SimulationException("The named Ensemble does not exist");
        }
View Full Code Here

      Termination projectionTermination = proj.getTermination();
      boolean projectionTerminationWrapped = projectionTermination instanceof TerminationWrapper;
      if(projectionTerminationWrapped)
        projectionTermination = ((TerminationWrapper) projectionTermination).getBaseTermination();
     
      Node terminationNode = projectionTermination.getNode();

      Origin projectionOrigin = proj.getOrigin();
      boolean projectionOriginWrapped = projectionOrigin instanceof OriginWrapper;
     
      if(projectionOriginWrapped)
        projectionOrigin = ((OriginWrapper) projectionOrigin).getWrappedOrigin();
     
      Node originNode = projectionOrigin.getNode();
     
      //Don't add self loops, since they are irrelevant to the min-cut computation
      //(and it allows us to use a SimpleWeightedGraph object).
      if(originNode != terminationNode){
        NodeVertex terminationVertex = nodeToVertex.get(terminationNode)
View Full Code Here

        SynapticIntegrator integrator = myIntegratorFactory.make();
        SpikeGenerator generator = myGeneratorFactory.make();
        float scale = myScale.sample()[0];
        float bias = myBias.sample()[0];

        Node result = null;

        if (integrator instanceof ExpandableNode) {
            result = new ExpandableSpikingNeuron(integrator, generator, scale, bias, name);
        } else {
            result = new SpikingNeuron(integrator, generator, scale, bias, name);
View Full Code Here

        }
        else if(tempOrigin instanceof NetworkArrayImpl.ArrayOrigin &&
            tempOrigin.getNode() instanceof NetworkArrayImpl)
        {
          originNodeFullName.deleteCharAt(originNodeFullName.length()-1);
          Node node = tempOrigin.getNode().getChildren()[0];
         
          try{
            dOrigin = (DecodedOrigin) node.getOrigin(tempOrigin.getName());
          }catch(StructuralException e){
            dOrigin = null;
          }
        }
        else
View Full Code Here

    protected void action() throws ActionException {
        Object obj = NewConfigurableDialog.showDialog(UIEnvironment.getInstance(), objType, null);
        if (obj == null) {
            throw new UserCancelledException();
        } else if (obj instanceof Node) {
            Node node = (Node) obj;
            try {
                CreateModelAction.ensureNonConflictingName(node, container);
                UINeoNode nodeUI = container.addNodeModel(node);
                if (nodeUI instanceof UINodeViewable) {
                    ((UINodeViewable) (nodeUI)).openViewer();
View Full Code Here

   * Performs a shallow copy. Origins and Terminations are not cloned, because generally they
   * will have to be reparameterized, at least to point to the new Node.
   */
  @Override
  public Node clone() throws CloneNotSupportedException {
    Node result = (Node) super.clone();
    return result;
  }
View Full Code Here

      ArrayList<Node> nodes = clipboard.getContents();
      ArrayList<Point2D> offsets = clipboard.getOffsets();
      WorldImpl clipboardSrcWorld = clipboard.getSourceWorld();
         
          for (int i = 0; i < nodes.size(); i++) {
            Node node = nodes.get(i);
            try {
              CreateModelAction.ensureNonConflictingName(node, nodeContainer);
              if (posX == null || posY == null) {
                nodeContainer.addNodeModel(node, posX, posY);
              } else {
View Full Code Here

            Object model = ModelFactory.constructModel(constructable);
            if (model == null) {
              throw new ActionException("No model was created");
            } else if (model instanceof Node) {
                final Node node = (Node) model;

                SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                        try {
                            ensureNonConflictingName(node, container);
View Full Code Here

TOP

Related Classes of ca.nengo.model.Node

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.