Examples of Node


Examples of org.wymiwyg.rdf.graphs.Node

  private void writeGraph(File directory, Graph graph) throws IOException {
    NaturalizedGraph naturalizedGraph = new NaturalizedGraph(graph,
        new Naturalizer() {
          public Node naturalize(FunctionallyGroundedNode fgNode,
              Graph graph) {
            Node anonymousNode = new NodeImpl();
            graph.add(new TripleImpl(anonymousNode,
                new PropertyNodeImpl(
                    MODELDIFF.functionallyGroundedIn
                        .getURI()),
                addFunctionallyGroundedNode(fgNode)));

Examples of org.yaml.snakeyaml.nodes.Node

  // Code borrowed from snakeyaml
  // (http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeyaml/issues/issue60/SkipBeanTest.java)
  @Override
  protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) {
    NodeTuple tuple = super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
    Node valueNode = tuple.getValueNode();
    if (valueNode instanceof CollectionNode) {
      // Removed null check
      if (Tag.SEQ.equals(valueNode.getTag())) {
        SequenceNode seq = (SequenceNode) valueNode;
        if (seq.getValue().isEmpty()) { return null; // skip empty lists
        }
      }
      if (Tag.MAP.equals(valueNode.getTag())) {
        MappingNode seq = (MappingNode) valueNode;
        if (seq.getValue().isEmpty()) { return null; // skip empty maps
        }
      }
    }

Examples of org.yinwang.pysonar.ast.Node

    @Nullable
    private Type parseAndResolve(String file) {
        loadingProgress.tick();

        try {
            Node ast = getAstForFile(file);

            if (ast == null) {
                failedToParse.add(file);
                return null;
            } else {

Examples of org.yinwang.yin.ast.Node

     * Helper for nextNode, which does the real work
     *
     * @return a Node or null if file ends
     */
    public Node nextNode1(int depth) throws ParserException {
        Node first = lexer.nextToken();

        // end of file
        if (first == null) {
            return null;
        }

        if (Delimeter.isOpen(first)) {   // try to get matched (...)
            List<Node> elements = new ArrayList<>();
            Node next;
            for (next = nextNode1(depth + 1);
                 !Delimeter.match(first, next);
                 next = nextNode1(depth + 1))
            {
                if (next == null) {
                    throw new ParserException("unclosed delimeter till end of file: " + first.toString(), first);
                } else if (Delimeter.isClose(next)) {
                    throw new ParserException("unmatched closing delimeter: " +
                            next.toString() + " does not close " + first.toString(), next);
                } else {
                    elements.add(next);
                }
            }
            return new Tuple(elements, first, next, first.file, first.start, next.end, first.line, first.col);

Examples of org.zkybase.api.domain.node.Node

  @RequestMapping(value = "/{ciPath}/{id}", method = RequestMethod.GET, produces = "application/json")
  @ResponseBody
  public Dto get(@PathVariable String ciPath, @PathVariable Long id) {
    String ciType = getCiType(ciPath);
    GraphRepository<Node> repo = getRepo(ciType);
    Node node = repo.findOne(id);
    return getMapper(ciType).toDto(node);
  }

Examples of pivot.wtk.text.Node

                    y -= nodeView.getY();

                    offset = nodeView.getCharacterAt(x, y);

                    // Adjust the offset
                    Node node = nodeView.getNode();
                    offset += node.getOffset();
                } else {
                    // Return the character count of this node
                    Node node = getNode();
                    offset = node.getCharacterCount();
                }
            }

            return offset;
        }

Examples of prefuse.data.Node

     * numberOfNodes)
     */
    Table nodeTable = g.getNodeTable();
    for (IntIterator ii = nodeTable.rows(); ii.hasNext();) {
      int nodeID = ii.nextInt();
      Node node = g.getNode(nodeID);
     
      int numEdges = g.getInDegree(node) + g.getOutDegree(node);
     
      Integer currentFrequency =
        (Integer) nodeDegreeFrequencies.get(new Integer(numEdges));

Examples of primitives.graph.Node

        double f_m = f((ClusterNode)icl, g);
        f_values.put(icl, f_m);
        F += f_m;
      }else{
        //nodes;
        Node n;
        n = icl.getNodes().toArray(new Node[1])[0];
        double f_n = f(n,g);
        f_values.put(icl,f_n);
        F += f_n;
      }
    }
   
    for(IClusterLevel icl : f_values.keySet()){
      double f = f_values.get(icl);
      ret += l(-Math.log(f/F)  ) - f * Math.log(f/F)
    }
   
    //HIERARCHY ENCODING
    for(Node n : container.getNodesInLeaves()){
      for(Node nP : n.getTransitionsAsN()){
        ret += l(relativeDepth(container, lowestCommonAncestor(n,nP, ch), ch));
       
       
      }
     

Examples of progs.lib.Graph.Node

        "   ",
        "   ",
        "   ",
    };
    Graph graph = Graph.fromStringArray(array);
    Assert.assertEquals(2, new BFS(graph).distanceFrom(new Node(0, 0), new Node(2, 2)));
    Assert.assertEquals(2, new BFS(graph).distanceFrom(new Node(0, 0), new Node(0, 2)));
    array = new String[]{
        " ",
        "#",
        " "};
    graph = Graph.fromStringArray(array);
    Assert.assertEquals(10 /*graph size = 3; so 3 * 3 + 1*/,
        new BFS(graph).distanceFrom(new Node(0, 0), new Node(2, 0)));
  }

Examples of propagation.Node

      }

      List childNodes = node.getChildren();
      size = childNodes.size();
      for (int idx = 0; idx < size; idx++) {
         Node child = (Node) childNodes.get(idx);
         StateItem childSummary = child.getSummaryStateItem();

         maxSeverity = updateMaxSeverity(maxSeverity, childSummary);
      }

      long summaryState = STATE_CLEAR + maxSeverity;
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.