Examples of Node


Examples of communicator.Node

        Collections.sort(testMessages);
        try {
            Communicator comm = Communicator.getCommunicator();

            for(TestMessage msg : testMessages) {
                Node node = comm.getNodeForId(msg.getNodeId());
                if(node!=null)
                    node.sendMessage(msg);
            }
        } catch(Exception ex) {
            ex.printStackTrace();
        }
    }//GEN-LAST:event_submitButtonActionPerformed

Examples of core.Trees.Node

        Map<Vertex, Node> vertexCliqueMap = new HashMap<Vertex, Node>();
        CliqueTree cliqueTree = new CliqueTree();
        Vertex root = order[order.length - 1];
        ArrayList<Vertex> rootCliqueVertices = new ArrayList<Vertex>();
        rootCliqueVertices.add(root);
        Node initialClique = new Node(null, rootCliqueVertices);
        cliqueTree.addNode(initialClique);
        vertexCliqueMap.put(root, initialClique);
        for (int i = order.length - 2; i >= 0; i--) {
            Vertex x = order[i];
            ArrayList<Vertex> RNwithoutParent = new ArrayList<Vertex>(x.getRightNeighbours());
            RNwithoutParent.remove(x.getParent());
            ArrayList<Vertex> RNofParent = null;
            if (x != null && x.getParent() != null && x.getParent().getRightNeighbours() != null) {
                RNofParent = new ArrayList<Vertex>(x.getParent().getRightNeighbours());
            }
            if (!RNwithoutParent.equals(RNofParent)) {
                ArrayList<Vertex> cliqueVertices = new ArrayList<Vertex>();
                cliqueVertices.add(x);
                cliqueVertices.addAll(x.getRightNeighbours());
                Node clique = new Node(vertexCliqueMap.get(x.getParent()), cliqueVertices);
                vertexCliqueMap.put(x, clique);
                cliqueTree.addNode(clique);
            } else {
                Node parentClique = vertexCliqueMap.get(x.getParent());
                ArrayList<Vertex> cliqueVerteces = new ArrayList<Vertex>();
                boolean similarRN = false;
                for (Vertex vertex : parentClique.getData()) {
                    if (x.getRightNeighbours().equals(vertex.getRightNeighbours())) {
                        similarRN = true;
                        break;
                    } else {
                        similarRN = false;
                    }
                }
                if (similarRN == false) {
                    cliqueVerteces.add(x);
                    cliqueVerteces.addAll(parentClique.getData());
                    parentClique.setData(cliqueVerteces);
                    vertexCliqueMap.put(x, parentClique);
                } else {
                    cliqueVerteces.add(x);
                    cliqueVerteces.addAll(x.getRightNeighbours());
                    Node clique = new Node(vertexCliqueMap.get(x.getParent()), cliqueVerteces);
                    vertexCliqueMap.put(x, clique);
                    cliqueTree.addNode(clique);
                }
            }
        }

Examples of cz.matfyz.aai.fantom.game.Graph.Node

   * @param transport the transport type used for the movement.
   * @throws ProtocolException if the actor cannot perform such move.
   * @returns information about the movement of the actor.
   */
  public PositionChange moveTo(Node target, TransportType transport) throws ProtocolException {
    Node origin = getCurrentPosition();
    if(!canMoveTo(target, transport))
      throw new ProtocolException("Cannot perform the requested move", null);
   
    // Use one ticket for the selected transport type
    addTickets(transport, -1);

Examples of de.ailis.jollada.model.Node

     */

    @Test
    public void testId()
    {
        final Node node = new Node();
        assertNull(node.getId());
        node.setId("foo");
        assertEquals("foo", node.getId());
        node.setId(null);
        assertNull(node.getId());
    }

Examples of de.axxeed.animosy.model.Node

        if(game.getCurrentMove() != moveNo) {
          this.setPriority(6);
          log.info("Moving MrX in separate thread (move #"+game.getCurrentMove()+")...");
          moveNo = game.getCurrentMove();
         
          Node mrXMove = moveMrX();
          int type = game.getBoard().getMrX().changePosition(mrXMove);
          Manager.getGame().getTracker().nextMove(type);
          log.debug("MrX move done...");
          this.setPriority(Thread.NORM_PRIORITY);
          Manager.getGame().nextDetective();

Examples of de.hwrberlin.it11.tsp.model.Node

   * Testet das Hinzuf�gen einer Node zum Projekt.
   */
  public void testNodeAdd() {
    TSPData data = new TSPData();
    int count = data.getNodeList().size();
    data.addNode(new Node(0, 0));
    assertTrue(count + 1 == data.getNodeList().size());
  }

Examples of de.metalcon.autocompleteServer.Helper.SuggestTree.Node

   * @param numItems
   */
  private static void retrieveSuggestions(HttpServletRequest request,
      ProcessRetrieveResponse response, SuggestTree index, String term,
      Integer numItems) {
    Node suggestions = index.getBestSuggestions(term);
    System.out.println(index.size() + " , " + suggestions.listLength());
    if (suggestions == null) {
      response.addError(RetrieveStatusCodes.NO_SUGGESTIONS_MATCHING_TERM);
      return;
    }
    for (int i = 0; i < Math.min(suggestions.listLength(), numItems); ++i) {
      String suggestString = suggestions.getSuggestion(i);
      String key = suggestions.getKey(i);
      response.addSuggestion(suggestString, key);
    }
  }

Examples of de.neuland.jade4j.parser.node.Node

    return config.getS3Configuration();
  }

  private JadeTemplate getJadeTemplate(String name) throws IOException {
    Parser parser = new Parser("templates/" + name, JadeHelper.JADE_LOADER);
    Node root = parser.parse();

    final JadeTemplate jadeTemplate = new JadeTemplate();

    jadeTemplate.setTemplateLoader(JadeHelper.JADE_LOADER);
    jadeTemplate.setRootNode(root);

Examples of de.pdark.decentxml.Node

      if (parentNode!=null) {
        List<Node> allChildNodes = parentNode.getNodes();
        boolean nonTextChild = false;
        for (Iterator<Node> it = allChildNodes.iterator(); it
            .hasNext();) {
          Node node = it.next();
          if (node.getType()!=Type.TEXT) {
            nonTextChild = true;
          }         
        }
        if (!nonTextChild) {
          for (Iterator<Node> it = allChildNodes.iterator(); it
              .hasNext();) {
            Node node = it.next();
            it.remove();
          }
          if (!parentNode.hasNodes()) {
            parentNode.setCompactEmpty(true);
          }

Examples of de.schauderhaft.degraph.model.Node

    this.typ = typ;
    return this;
  }

  public Node createSimpleNode() {
    Node simpleNode = new SimpleNode(typ, name);
    return simpleNode;
  }
TOP
Copyright © 2018 www.massapi.com. 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.